mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
c47ea5d2bb
On xtensa architecture, the call to __assert_func uses a reference to __func__ that can sometimes be placed in flash. Since the __asert_func can be called from functions in IRAM the check_callgraph script can report an error when checking for invalid calls from IRAM to flash sections. However, the __asert_func prevents this scenario at runtime so the check_callgraph script reports a 'flas positive' situation. For this reasson, all references to __func__$x found prior to a call to __assert_func are droped in the parsing of the rtl files.
20 lines
938 B
CMake
20 lines
938 B
CMake
idf_component_register(SRC_DIRS "."
|
|
PRIV_INCLUDE_DIRS "."
|
|
PRIV_REQUIRES cmock test_utils heap spi_flash)
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
|
|
|
if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
|
idf_build_get_property(elf_file_name EXECUTABLE GENERATOR_EXPRESSION)
|
|
add_custom_target(check_test_app_sections ALL
|
|
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
|
|
--rtl-dir ${CMAKE_BINARY_DIR}/esp-idf/heap/
|
|
--elf-file ${CMAKE_BINARY_DIR}/${elf_file_name}
|
|
find-refs
|
|
--from-sections=.iram0.text
|
|
--to-sections=.flash.text,.flash.rodata
|
|
--ignore-symbols=__func__/__assert_func,__func__/heap_caps_alloc_failed
|
|
--exit-code
|
|
DEPENDS ${elf_file_name}
|
|
)
|
|
endif()
|