Skip to content

Commit 3751479

Browse files
committed
change(bootloader): removed support for CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE
1 parent b9c2242 commit 3751479

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ if(BOOTLOADER_BUILD)
2929
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CONFIG_IDF_TARGET_LINUX)
3030
list(APPEND compile_options "-fno-shrink-wrap") # Disable shrink-wrapping to reduce binary size
3131
endif()
32-
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE)
33-
list(APPEND compile_options "-O0")
3432
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF)
3533
list(APPEND compile_options "-O2")
3634
endif()

components/bootloader/Kconfig.projbuild

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ menu "Bootloader config"
3434
bool "Debug (-Og)"
3535
config BOOTLOADER_COMPILER_OPTIMIZATION_PERF
3636
bool "Optimize for performance (-O2)"
37-
config BOOTLOADER_COMPILER_OPTIMIZATION_NONE
38-
bool "Debug without optimization (-O0) (Deprecated, will be removed in IDF v6.0)"
39-
depends on IDF_TARGET_ARCH_XTENSA || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
4037

4138
endchoice
4239

components/bootloader/sdkconfig.rename

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ CONFIG_SECURE_BOOT_ENABLED CONFIG_SECURE_BOOT_V
2727
CONFIG_SPI_FLASH_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH
2828
CONFIG_SPI_FLASH_QUAD_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH
2929
CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
30+
31+
32+
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG

docs/en/migration-guides/release-6.x/6.0/system.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@ Update to:
3737
if (causes & BIT(ESP_SLEEP_WAKEUP_TIMER)) {
3838
handle_timer_wakeup();
3939
}
40+
41+
Bootloader
42+
----------
43+
44+
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<CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG>`) optimization level instead. This provides a good balance between optimization and debuggability.

0 commit comments

Comments
 (0)