mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
1786fc9ed2
This commit refactors backtracing within the panic handler so that a common function esp_backtrace_get_next_frame() is used iteratively to traverse a callstack. A esp_backtrace_print() function has also be added that allows the printing of a backtrace at runtime. The esp_backtrace_print() function allows unity to print the backtrace of failed test cases and jump back to the main test menu without the need reset the chip. esp_backtrace_print() can also be used as a debugging function by users.
28 lines
681 B
CMake
28 lines
681 B
CMake
set(COMPONENT_SRCS "unity/src/unity.c"
|
|
"unity_port_esp32.c")
|
|
|
|
set(COMPONENT_ADD_INCLUDEDIRS "include"
|
|
"unity/src")
|
|
|
|
if(CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL)
|
|
list(APPEND COMPONENT_PRIV_INCLUDEDIRS "include/priv")
|
|
endif()
|
|
|
|
if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER)
|
|
list(APPEND COMPONENT_SRCS "unity_runner.c")
|
|
endif()
|
|
|
|
if(CONFIG_UNITY_ENABLE_FIXTURE)
|
|
list(APPEND COMPONENT_SRCS "unity/extras/fixture/src/unity_fixture.c")
|
|
endif()
|
|
|
|
register_component()
|
|
|
|
target_compile_definitions(${COMPONENT_TARGET} PUBLIC
|
|
-DUNITY_INCLUDE_CONFIG_H
|
|
)
|
|
|
|
if(GCC_NOT_5_2_0)
|
|
component_compile_options(-Wno-unused-const-variable)
|
|
endif()
|