sleep: disable switch-case jump tables from being placed in flash

sleep_modes.c contains switch statements that should be placed in flash.
Settings for avoiding this was not updated during sleep_modes refactor.
This commit is contained in:
Marius Vikhammer 2021-04-09 14:15:11 +08:00
parent 80723de12d
commit 38d9251bda
2 changed files with 5 additions and 4 deletions

View File

@ -17,6 +17,11 @@ if(NOT BOOTLOADER_BUILD)
"mac_addr.c"
"sleep_modes.c")
list(APPEND priv_requires esp_ipc)
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/sleep_modes.c" PROPERTIES
COMPILE_FLAGS "-fno-jump-tables -fno-tree-switch-conversion")
endif()
endif()
idf_component_register(SRCS ${srcs}

View File

@ -52,10 +52,6 @@ else()
PROPERTIES COMPILE_FLAGS
-fno-stack-protector)
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/sleep_modes.c" PROPERTIES
COMPILE_FLAGS "-fno-jump-tables -fno-tree-switch-conversion")
endif()
endif()
if(CONFIG_IDF_ENV_FPGA)