2019-06-21 06:29:32 +00:00
|
|
|
set(srcs
|
|
|
|
"app_trace.c"
|
|
|
|
"app_trace_util.c"
|
|
|
|
"host_file_io.c"
|
|
|
|
"gcov/gcov_rtio.c")
|
|
|
|
|
2019-04-28 07:38:23 +00:00
|
|
|
set(include_dirs "include")
|
2018-01-19 05:22:08 +00:00
|
|
|
|
2018-03-20 01:27:00 +00:00
|
|
|
if(CONFIG_SYSVIEW_ENABLE)
|
2019-04-28 07:38:23 +00:00
|
|
|
list(APPEND include_dirs
|
2018-02-27 06:44:31 +00:00
|
|
|
sys_view/Config
|
|
|
|
sys_view/SEGGER
|
|
|
|
sys_view/Sample/OS)
|
|
|
|
|
2019-06-21 06:29:32 +00:00
|
|
|
list(APPEND srcs
|
|
|
|
"sys_view/SEGGER/SEGGER_SYSVIEW.c"
|
|
|
|
"sys_view/Sample/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c"
|
|
|
|
"sys_view/Sample/OS/SEGGER_SYSVIEW_FreeRTOS.c"
|
|
|
|
"sys_view/esp32/SEGGER_RTT_esp32.c"
|
|
|
|
"sys_view/ext/heap_trace_module.c"
|
|
|
|
"sys_view/ext/logging.c")
|
2018-12-12 17:35:17 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_HEAP_TRACING_TOHOST)
|
2019-04-28 07:38:23 +00:00
|
|
|
list(APPEND srcs "heap_trace_tohost.c")
|
2018-02-27 06:44:31 +00:00
|
|
|
endif()
|
|
|
|
|
2019-04-28 07:38:23 +00:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
|
|
|
PRIV_REQUIRES soc
|
|
|
|
LDFRAGMENTS linker.lf)
|
2018-02-27 06:44:31 +00:00
|
|
|
|
|
|
|
# disable --coverage for this component, as it is used as transport
|
|
|
|
# for gcov
|
2019-05-10 02:53:08 +00:00
|
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-fno-profile-arcs" "-fno-test-coverage")
|
2019-10-01 17:42:32 +00:00
|
|
|
|
|
|
|
# Force app_trace to also appear later than gcov in link line
|
|
|
|
add_library(gcov_apptrace INTERFACE)
|
|
|
|
idf_component_get_property(app_trace app_trace COMPONENT_LIB)
|
|
|
|
target_link_libraries(gcov_apptrace INTERFACE $<TARGET_FILE:${app_trace}> gcov $<TARGET_FILE:${app_trace}>)
|
|
|
|
target_link_libraries(${COMPONENT_LIB} PUBLIC gcov_apptrace ${LIBC})
|