zephyr/modules/segger/CMakeLists.txt
Florian Grandel 6262304125 tracing: segger-sysview: conf include fix
The Zephyr-specific Segger SystemView configuration was not used as
the same file was available inside the external Segger module with
higher import priority.

Fixes the regression by moving the SystemView configuration to the same
place in the external module where RTT configuration already resides and
thereby creates a canonical include path to avoid further regressions of
the same kind.

Fixes: #61133

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-06 07:44:06 -04:00

29 lines
784 B
CMake

if(CONFIG_USE_SEGGER_RTT)
zephyr_library()
set(SEGGER_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
zephyr_include_directories_ifdef(CONFIG_USE_SEGGER_RTT
${SEGGER_DIR}/SEGGER
${SEGGER_DIR}/Config
)
zephyr_library_sources(
${SEGGER_DIR}/SEGGER/SEGGER_RTT.c
SEGGER_RTT_zephyr.c
)
zephyr_library_sources_ifdef(CONFIG_SEGGER_SYSTEMVIEW ${SEGGER_DIR}/SEGGER/SEGGER_SYSVIEW.c)
endif()
if(CONFIG_SEGGER_DEBUGMON)
if(!CONFIG_USE_SEGGER_RTT)
zephyr_library()
endif()
set(SEGGER_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
zephyr_include_directories_ifdef(CONFIG_SEGGER_DEBUGMON
${SEGGER_DIR}/SEGGER/DebugMon/include
)
zephyr_library_sources(
${SEGGER_DIR}/SEGGER/DebugMon/JLINK_MONITOR.c
${SEGGER_DIR}/SEGGER/DebugMon/JLINK_MONITOR_ISR_SES.s
)
endif()