Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(arduino): changes ESP32 definition in CMakeLists.txt file #10259

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

SuGlider
Copy link
Collaborator

Description of Change

Fixes an issue related to esp_matter component that defines a path using ESP32 as folder.
Because Arduino defines ESP32 to 1, it causes an expansion error for folder using ESP32 folder name.

-DESP32 ==> #define ESP32 1
#define CHIP_PLATFORM_CONFIG_INCLUDE <platform/ESP32/CHIPPlatformConfig.h>
will expand to
#define CHIP_PLATFORM_CONFIG_INCLUDE <platform/1/CHIPPlatformConfig.h>

Tests scenarios

Building Arduino + Matter as IDF Component in the same project.

Related links

#7432 (comment)

Fixes an issue related to ESP_MATTER component that defines a path using ESP32 as folder. Because Arduino defines ESP32 to 1, it causes an expansion error for folder using ESP32 folder name.
@SuGlider SuGlider added the Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF label Aug 28, 2024
@SuGlider SuGlider added this to the 3.0.5 milestone Aug 28, 2024
@SuGlider SuGlider self-assigned this Aug 28, 2024
Copy link
Contributor

github-actions bot commented Aug 28, 2024

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "fix(arduino): changes definitions in cmakelists.txt file":
    • body's lines must not be longer than 100 characters

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 20 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

👋 Hello SuGlider, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 25f4e40

@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Aug 28, 2024
@me-no-dev me-no-dev merged commit e5394cc into master Aug 28, 2024
12 checks passed
@me-no-dev me-no-dev deleted the esp_matter_arduino_esp32_def branch August 28, 2024 19:46
@Jason2866
Copy link
Collaborator

Jason2866 commented Aug 31, 2024

@SuGlider PR brakes compability with pioarduino/Platformio. It causes masses of redefine warnings

Building in release mode
Compiling .pio/build/tasmota32-nspanel/src/tasmota.ino.cpp.o
Building .pio/build/tasmota32-nspanel/bootloader.bin
Generating partitions .pio/build/tasmota32-nspanel/partitions.bin
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
esptool.py v4.7.6
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
Compiling .pio/build/tasmota32-nspanel/lib3cf/Wire/Wire.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Compiling .pio/build/tasmota32-nspanel/lib53b/Adafruit_CCS811-1.0.0.14/Adafruit_CCS811.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Compiling .pio/build/tasmota32-nspanel/lib18d/SPI/SPI.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Archiving .pio/build/tasmota32-nspanel/lib3cf/libWire.a
Indexing .pio/build/tasmota32-nspanel/lib3cf/libWire.a
Compiling .pio/build/tasmota32-nspanel/libc70/Adafruit_MAX31865-1.1.0-custom/Adafruit_MAX31865.cpp.o
Archiving .pio/build/tasmota32-nspanel/lib18d/libSPI.a
Archiving .pio/build/tasmota32-nspanel/lib53b/libAdafruit_CCS811-1.0.0.14.a
Indexing .pio/build/tasmota32-nspanel/lib53b/libAdafruit_CCS811-1.0.0.14.a
<command-line>: warning: "ESP32" redefined
Indexing .pio/build/tasmota32-nspanel/lib18d/libSPI.a
<command-line>: note: this is the location of the previous definition
Compiling .pio/build/tasmota32-nspanel/libf9d/Adafruit_MCP9808_Tasmota/Adafruit_MCP9808.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Compiling .pio/build/tasmota32-nspanel/lib2f4/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Archiving .pio/build/tasmota32-nspanel/libc70/libAdafruit_MAX31865-1.1.0-custom
Indexing .pio/build/tasmota32-nspanel/libc70/libAdafruit_MAX31865-1.1.0-custom
Compiling .pio/build/tasmota32-nspanel/lib2f4/Adafruit_BusIO/Adafruit_I2CDevice.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Archiving .pio/build/tasmota32-nspanel/libf9d/libAdafruit_MCP9808_Tasmota.a
Indexing .pio/build/tasmota32-nspanel/libf9d/libAdafruit_MCP9808_Tasmota.a
Compiling .pio/build/tasmota32-nspanel/lib2f4/Adafruit_BusIO/Adafruit_SPIDevice.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Compiling .pio/build/tasmota32-nspanel/libc3a/Adafruit_PM25AQI-1.0.6/Adafruit_PM25AQI.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Compiling .pio/build/tasmota32-nspanel/lib0ea/Adafruit_SGP30-1.2.0/Adafruit_SGP30.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Archiving .pio/build/tasmota32-nspanel/lib2f4/libAdafruit_BusIO.a
Indexing .pio/build/tasmota32-nspanel/lib2f4/libAdafruit_BusIO.a
Compiling .pio/build/tasmota32-nspanel/libdee/Adafruit_SGP40-1.1.0/Adafruit_SGP40.cpp.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
Archiving .pio/build/tasmota32-nspanel/libc3a/libAdafruit_PM25AQI-1.0.6.a
Indexing .pio/build/tasmota32-nspanel/libc3a/libAdafruit_PM25AQI-1.0.6.a
Compiling .pio/build/tasmota32-nspanel/libdee/Adafruit_SGP40-1.1.0/sensirion_voc_algorithm.c.o
<command-line>: warning: "ESP32" redefined
<command-line>: note: this is the location of the previous definition
... and many more.

@Jason2866
Copy link
Collaborator

Jason2866 commented Aug 31, 2024

As it used before it was just a compile flag setting. Since Matter is currently not supported nor working imho the PR should reverted until a non conflicting solution is found.

EDIT: Probably fixed with espressif/esp32-arduino-lib-builder#217

@SuGlider
Copy link
Collaborator Author

Yes, espressif/esp32-arduino-lib-builder#217 will fix PIO adding -DESP32=ESP32 to its settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF Status: Pending Merge Pull Request is ready to be merged
Projects
Development

Successfully merging this pull request may close these issues.

3 participants