modules: build segger debugmon code with config
Updated segger module CMake to build code added by https://github.com/zephyrproject-rtos/segger/pull/14 when relevant config is provided. Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
This commit is contained in:
parent
48df1a2f2e
commit
ceb7ca7e80
|
@ -1,15 +1,29 @@
|
|||
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()
|
||||
|
|
|
@ -421,3 +421,11 @@ config GDBSTUB_BUF_SZ
|
|||
full GDB packet at a time.
|
||||
|
||||
endif
|
||||
|
||||
config SEGGER_DEBUGMON
|
||||
bool "Use Segger's J-Link debug monitor implementation"
|
||||
depends on CORTEX_M_DEBUG_MONITOR_HOOK
|
||||
help
|
||||
This option will enable Segger's implementation of
|
||||
the debug monitor interrupt, overriding the
|
||||
default z_arm_debug_monitor symbol.
|
||||
|
|
Loading…
Reference in New Issue