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

Build error after modifying compile level (CON-395) #304

Closed
maenkai opened this issue Apr 3, 2023 · 5 comments
Closed

Build error after modifying compile level (CON-395) #304

maenkai opened this issue Apr 3, 2023 · 5 comments

Comments

@maenkai
Copy link

maenkai commented Apr 3, 2023

IDF-VERSION = V4.4.2
Modify compile level : Og -> O2

cmake error:

-- Adding linker script /home/mek/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/mek/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /home/mek/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
CMake Error at /home/mek/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/CMakeLists.txt:45 (message):
  CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE shall be set
@github-actions github-actions bot changed the title Build error after modifying compile level Build error after modifying compile level (CON-395) Apr 3, 2023
@maenkai
Copy link
Author

maenkai commented Apr 3, 2023

This configuration is OK for idf-V4.3.1
There was a problem in idf-V4.4.2

CONFIG_COMPILER_OPTIMIZATION=2
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y

@jadhavrohit924
Copy link
Contributor

IDF-VERSION = V4.4.2 Modify compile level : Og -> O2

cmake error:

-- Adding linker script /home/mek/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/mek/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /home/mek/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
CMake Error at /home/mek/esp/esp-matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/CMakeLists.txt:45 (message):
  CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE shall be set

As the error suggests here. Could you please try by setting CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y?

@maenkai
Copy link
Author

maenkai commented Apr 7, 2023

1.Setting this configuration is fine, but it seems like you won't be able to fire assert after configuring this item
2.I want to keep assert
3.This problem does not occur in V4.3.1

@shubhamdp
Copy link
Contributor

As I see this, its not at all related to IDF, see here: https://github.com/project-chip/connectedhomeip/blob/115eb6d384b587b84bd90f51b6ecae06dd1c9b4f/config/esp32/components/chip/CMakeLists.txt#L40-L49

This code checks if there is any sort of optimizations, it explicitly checks if assertions are disabled.

@shubhamdp
Copy link
Contributor

@maenkai PR: project-chip/connectedhomeip#11775 mentions more details why the above changes were made.

@maenkai maenkai closed this as completed Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants