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)
|
if(CONFIG_USE_SEGGER_RTT)
|
||||||
|
|
||||||
zephyr_library()
|
zephyr_library()
|
||||||
set(SEGGER_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
|
set(SEGGER_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
|
||||||
zephyr_include_directories_ifdef(CONFIG_USE_SEGGER_RTT
|
zephyr_include_directories_ifdef(CONFIG_USE_SEGGER_RTT
|
||||||
${SEGGER_DIR}/SEGGER
|
${SEGGER_DIR}/SEGGER
|
||||||
${SEGGER_DIR}/Config
|
${SEGGER_DIR}/Config
|
||||||
.
|
.
|
||||||
)
|
)
|
||||||
zephyr_library_sources(
|
zephyr_library_sources(
|
||||||
${SEGGER_DIR}/SEGGER/SEGGER_RTT.c
|
${SEGGER_DIR}/SEGGER/SEGGER_RTT.c
|
||||||
SEGGER_RTT_zephyr.c
|
SEGGER_RTT_zephyr.c
|
||||||
)
|
)
|
||||||
zephyr_library_sources_ifdef(CONFIG_SEGGER_SYSTEMVIEW ${SEGGER_DIR}/SEGGER/SEGGER_SYSVIEW.c)
|
zephyr_library_sources_ifdef(CONFIG_SEGGER_SYSTEMVIEW ${SEGGER_DIR}/SEGGER/SEGGER_SYSVIEW.c)
|
||||||
endif()
|
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.
|
full GDB packet at a time.
|
||||||
|
|
||||||
endif
|
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.
|
||||||
|
|
2
west.yml
2
west.yml
|
@ -209,7 +209,7 @@ manifest:
|
||||||
path: modules/lib/picolibc
|
path: modules/lib/picolibc
|
||||||
revision: 04ada5951cbaf8e7b17f8226ce31cb6837c28ba7
|
revision: 04ada5951cbaf8e7b17f8226ce31cb6837c28ba7
|
||||||
- name: segger
|
- name: segger
|
||||||
revision: d4e568a920b4bd087886170a5624c167b2d0665e
|
revision: e2ff2200556e8a8f962921444275c04971a2bb3d
|
||||||
path: modules/debug/segger
|
path: modules/debug/segger
|
||||||
groups:
|
groups:
|
||||||
- debug
|
- debug
|
||||||
|
|
Loading…
Reference in a new issue