diff --git a/CMakeLists.txt b/CMakeLists.txt index 10aeaf82ca..4ceaeecad7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,6 @@ if(BOOTLOADER_BUILD) if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CONFIG_IDF_TARGET_LINUX) list(APPEND compile_options "-fno-shrink-wrap") # Disable shrink-wrapping to reduce binary size endif() - elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE) - list(APPEND compile_options "-O0") elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF) list(APPEND compile_options "-O2") endif() diff --git a/components/bootloader/Kconfig.projbuild b/components/bootloader/Kconfig.projbuild index 0e40693ab0..f8ff0f146f 100644 --- a/components/bootloader/Kconfig.projbuild +++ b/components/bootloader/Kconfig.projbuild @@ -34,9 +34,6 @@ menu "Bootloader config" bool "Debug (-Og)" config BOOTLOADER_COMPILER_OPTIMIZATION_PERF bool "Optimize for performance (-O2)" - config BOOTLOADER_COMPILER_OPTIMIZATION_NONE - bool "Debug without optimization (-O0) (Deprecated, will be removed in IDF v6.0)" - depends on IDF_TARGET_ARCH_XTENSA || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2 endchoice diff --git a/components/bootloader/sdkconfig.rename b/components/bootloader/sdkconfig.rename index bbc1846e7a..81d3926495 100644 --- a/components/bootloader/sdkconfig.rename +++ b/components/bootloader/sdkconfig.rename @@ -27,3 +27,6 @@ CONFIG_SECURE_BOOT_ENABLED CONFIG_SECURE_BOOT_V CONFIG_SPI_FLASH_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH CONFIG_SPI_FLASH_QUAD_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH + + +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG diff --git a/docs/en/migration-guides/release-6.x/6.0/system.rst b/docs/en/migration-guides/release-6.x/6.0/system.rst index 370f597a02..699a78edfa 100644 --- a/docs/en/migration-guides/release-6.x/6.0/system.rst +++ b/docs/en/migration-guides/release-6.x/6.0/system.rst @@ -38,3 +38,8 @@ Update to: if (causes & BIT(ESP_SLEEP_WAKEUP_TIMER)) { handle_timer_wakeup(); } + +Bootloader +---------- + +Removed option for compiling bootloader with no optimization level (-O0, `CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE`). On most targets it was no longer possible to compile the bootloader with -O0, as IRAM sections would overflow. For debugging purposes, it is recommended to use the -Og (:ref:`CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG`) optimization level instead. This provides a good balance between optimization and debuggability.