soc: espressif: esp32s3: add cross segment call check
Add build check that would detect unwanted calls from the `iram0.loader_text`, which is the last bootloader segment to be alive. Signed-off-by: Marek Matej <marek.matej@espressif.com>
This commit is contained in:
parent
61bb79c7ea
commit
9f1a4e3e4f
|
@ -58,6 +58,7 @@ if (CONFIG_SOC_ESP32S3_APPCPU)
|
|||
endif()
|
||||
|
||||
else()
|
||||
## Building for PROCPU
|
||||
|
||||
set_property(TARGET bintools PROPERTY disassembly_flag_inline_source)
|
||||
|
||||
|
@ -77,6 +78,21 @@ else()
|
|||
|
||||
endif()
|
||||
|
||||
if(CONFIG_MCUBOOT)
|
||||
# search from cross references between bootloader sections
|
||||
message("check_callgraph using: ${ESP_IDF_PATH}/tools/ci/check_callgraph.py")
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE} ${ESP_IDF_PATH}/tools/ci/check_callgraph.py
|
||||
ARGS
|
||||
--rtl-dirs ${CMAKE_BINARY_DIR}/zephyr
|
||||
--elf-file ${CMAKE_BINARY_DIR}/zephyr/${CONFIG_KERNEL_BIN_NAME}.elf
|
||||
find-refs
|
||||
--from-section='.iram0.loader_text'
|
||||
--to-section='.iram0.text'
|
||||
--exit-code)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MCUBOOT)
|
||||
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.ld CACHE INTERNAL "")
|
||||
elseif(CONFIG_SOC_ESP32S3_APPCPU)
|
||||
|
|
Loading…
Reference in New Issue