Skip to content

Commit fad8701

Browse files
committed
tracing: cleanup and split segger/rtt configuration options
Move rtt configuration options to drivers/debug and split the systemview configuration. drivers/debug will service for this class of drivers that are enabled in debug mode only and provide a hardware interface to the system. Signed-off-by: Anas Nashif <[email protected]>
1 parent 86adcd0 commit fad8701

File tree

6 files changed

+36
-24
lines changed

6 files changed

+36
-24
lines changed

drivers/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ source "drivers/lora/Kconfig"
1313

1414
source "drivers/console/Kconfig"
1515

16+
source "drivers/debug/Kconfig"
17+
1618
source "drivers/ethernet/Kconfig"
1719

1820
source "drivers/net/Kconfig"

drivers/debug/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2020 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
source "drivers/debug/Kconfig.rtt"

subsys/tracing/Kconfig.segger renamed to drivers/debug/Kconfig.rtt

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,6 @@ config USE_SEGGER_RTT
1616

1717
if USE_SEGGER_RTT
1818

19-
config SEGGER_SYSTEMVIEW
20-
bool "Segger SystemView support"
21-
select CONSOLE
22-
select RTT_CONSOLE
23-
select THREAD_MONITOR
24-
select THREAD_STACK_INFO
25-
select TRACING
26-
27-
config SEGGER_SYSTEMVIEW_BOOT_ENABLE
28-
bool "Start logging SystemView events on system start"
29-
depends on SEGGER_SYSTEMVIEW
30-
31-
config SEGGER_SYSVIEW_RTT_BUFFER_SIZE
32-
int "Buffer size for SystemView RTT"
33-
depends on SEGGER_SYSTEMVIEW
34-
default 4096
35-
3619
config SEGGER_RTT_MAX_NUM_UP_BUFFERS
3720
int "Maximum number of up-buffers"
3821
default 3
@@ -69,7 +52,7 @@ config SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
6952
endchoice
7053

7154
config SEGGER_RTT_MODE
72-
int
55+
int
7356
default 2 if SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
7457
default 1 if SEGGER_RTT_MODE_NO_BLOCK_TRIM
7558
default 0

subsys/debug/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Copyright (c) 2015 Wind River Systems, Inc.
44
# SPDX-License-Identifier: Apache-2.0
55

6-
DT_CHOSEN_Z_CONSOLE := zephyr,console
76

87
menu "System Monitoring Options"
98

@@ -282,5 +281,4 @@ config OPENOCD_SUPPORT
282281
OpenOCD to determine the state of running threads. (This option
283282
selects CONFIG_THREAD_MONITOR, so all of its caveats are implied.)
284283

285-
286284
endmenu

subsys/tracing/Kconfig

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config TRACING
99
bool "Enabling Tracing"
1010
imply THREAD_NAME
1111
imply THREAD_STACK_INFO
12+
imply THREAD_MONITOR
1213
help
1314
Enable system tracing. This requires a backend such as SEGGER
1415
Systemview to be enabled as well.
@@ -20,9 +21,20 @@ choice
2021
prompt "Tracing Format"
2122
default TRACING_CTF
2223

24+
config SEGGER_SYSTEMVIEW
25+
bool "Segger SystemView support"
26+
select CONSOLE
27+
select RTT_CONSOLE
28+
select USE_SEGGER_RTT
29+
30+
config TRACING_SYSTEMVIEW
31+
bool "Tracing via SEGGER Systemview support"
32+
help
33+
Enable tracing using SEGGER Systemview.
34+
2335
config TRACING_CTF
2436
bool "Tracing via Common Trace Format support"
25-
select THREAD_MONITOR
37+
2638
help
2739
Enable tracing to a Common Trace Format stream.
2840

@@ -165,8 +177,6 @@ endif
165177

166178
config TRACING_CPU_STATS
167179
bool "Enable CPU usage tracing"
168-
select THREAD_MONITOR
169-
select THREAD_STACK_INFO
170180
select TRACING
171181
help
172182
Module provides information about percent of CPU usage based on
@@ -189,4 +199,4 @@ config TRACING_CPU_STATS_INTERVAL
189199
Time period of displaying information about CPU usage.
190200

191201

192-
source "subsys/tracing/Kconfig.segger"
202+
source "subsys/tracing/sysview/Kconfig"

subsys/tracing/sysview/Kconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2016 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SEGGER_SYSTEMVIEW
5+
6+
config SEGGER_SYSTEMVIEW_BOOT_ENABLE
7+
bool "Start logging SystemView events on system start"
8+
depends on SEGGER_SYSTEMVIEW
9+
10+
config SEGGER_SYSVIEW_RTT_BUFFER_SIZE
11+
int "Buffer size for SystemView RTT"
12+
depends on SEGGER_SYSTEMVIEW
13+
default 4096
14+
15+
endif

0 commit comments

Comments
 (0)