Skip to content

Commit

Permalink
debug: fix RTT console Kconfig
Browse files Browse the repository at this point in the history
Use HAS_ Kconfig option as intended, those are invisible option that
signify support of a certain feature that can be selected by a hardware
or platform.

For RTT and system view this was not dont in an inconsistent way.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif authored and Anas Nashif committed Mar 19, 2018
1 parent 8470b4d commit e5f1b51
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 23 deletions.
2 changes: 2 additions & 0 deletions arch/arm/soc/nordic_nrf5/nrf52/Kconfig.soc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ depends on SOC_SERIES_NRF52X
config SOC_NRF52832_QFAA
bool "NRF52832_QFAA"
select SOC_NRF52832
select HAS_SEGGER_RTT

config SOC_NRF52840_QIAA
bool "NRF52840_QIAA"
select SOC_NRF52840
select HAS_SEGGER_RTT

endchoice

Expand Down
2 changes: 1 addition & 1 deletion ext/debug/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
add_subdirectory_ifdef(CONFIG_HAS_SEGGER_RTT segger)
add_subdirectory_ifdef(CONFIG_RTT_CONSOLE segger)
4 changes: 2 additions & 2 deletions ext/debug/segger/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

zephyr_include_directories(.)
zephyr_sources_ifdef(CONFIG_HAS_SEGGER_RTT rtt/SEGGER_RTT.c)
zephyr_sources_ifdef(CONFIG_HAS_SEGGER_SYSTEMVIEW systemview/SEGGER_SYSVIEW.c)
zephyr_sources_ifdef(CONFIG_RTT_CONSOLE rtt/SEGGER_RTT.c)
zephyr_sources_ifdef(CONFIG_SEGGER_SYSTEMVIEW systemview/SEGGER_SYSVIEW.c)
6 changes: 3 additions & 3 deletions ext/debug/segger/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

config HAS_SEGGER_RTT
bool
prompt "Segger RTT support"
default n

config HAS_SEGGER_SYSTEMVIEW
config SEGGER_SYSTEMVIEW
bool
prompt "Segger SystemView support"
default n
select HAS_SEGGER_RTT
depends on HAS_SEGGER_RTT
select RTT_CONSOLE
6 changes: 0 additions & 6 deletions samples/net/echo_client/prj_frdm_kw41z.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
CONFIG_UART_CONSOLE=y
CONFIG_RTT_CONSOLE=n
CONFIG_HAS_SEGGER_RTT=n
#CONFIG_OPENOCD_SUPPORT=y

CONFIG_BOOT_BANNER=y

CONFIG_STACK_SENTINEL=y
CONFIG_THREAD_MONITOR=y
CONFIG_OBJECT_TRACING=y
Expand Down
7 changes: 0 additions & 7 deletions samples/net/echo_server/prj_frdm_kw41z.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
CONFIG_UART_CONSOLE=y
CONFIG_RTT_CONSOLE=n
CONFIG_HAS_SEGGER_RTT=n
CONFIG_BOOT_BANNER=y

CONFIG_STACK_SENTINEL=y
CONFIG_THREAD_MONITOR=y
CONFIG_OBJECT_TRACING=y
CONFIG_KERNEL_SHELL=y


CONFIG_NETWORKING=y

CONFIG_NET_BUF_RX_COUNT=80
CONFIG_NET_BUF_TX_COUNT=40

Expand Down
4 changes: 2 additions & 2 deletions samples/subsys/debug/sysview/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH=y
CONFIG_KERNEL_EVENT_LOGGER_INTERRUPT=y
CONFIG_KERNEL_EVENT_LOGGER_SLEEP=y
CONFIG_KERNEL_EVENT_LOGGER_THREAD=y
CONFIG_HAS_SEGGER_RTT=y
CONFIG_HAS_SEGGER_SYSTEMVIEW=y
CONFIG_SEGGER_SYSTEMVIEW=y
CONFIG_SEGGER_RTT=y
CONFIG_THREAD_MONITOR=y
CONFIG_SYS_LOG=y
CONFIG_SYS_LOG_DEFAULT_LEVEL=3
Expand Down
4 changes: 2 additions & 2 deletions samples/subsys/debug/sysview/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ sample:
name: Systemview Demo
tests:
test:
platform_whitelist: frdm_k64f
tags: apps debug
filter: CONFIG_HAS_SEGGER_RTT
tags: debug tracing

0 comments on commit e5f1b51

Please sign in to comment.