Skip to content

Commit

Permalink
tracing: cleanup and split segger/rtt configuration options
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
nashif committed Feb 7, 2020
1 parent 86adcd0 commit fad8701
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 24 deletions.
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ source "drivers/lora/Kconfig"

source "drivers/console/Kconfig"

source "drivers/debug/Kconfig"

source "drivers/ethernet/Kconfig"

source "drivers/net/Kconfig"
Expand Down
4 changes: 4 additions & 0 deletions drivers/debug/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

source "drivers/debug/Kconfig.rtt"
19 changes: 1 addition & 18 deletions subsys/tracing/Kconfig.segger → drivers/debug/Kconfig.rtt
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,6 @@ config USE_SEGGER_RTT

if USE_SEGGER_RTT

config SEGGER_SYSTEMVIEW
bool "Segger SystemView support"
select CONSOLE
select RTT_CONSOLE
select THREAD_MONITOR
select THREAD_STACK_INFO
select TRACING

config SEGGER_SYSTEMVIEW_BOOT_ENABLE
bool "Start logging SystemView events on system start"
depends on SEGGER_SYSTEMVIEW

config SEGGER_SYSVIEW_RTT_BUFFER_SIZE
int "Buffer size for SystemView RTT"
depends on SEGGER_SYSTEMVIEW
default 4096

config SEGGER_RTT_MAX_NUM_UP_BUFFERS
int "Maximum number of up-buffers"
default 3
Expand Down Expand Up @@ -69,7 +52,7 @@ config SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
endchoice

config SEGGER_RTT_MODE
int
int
default 2 if SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
default 1 if SEGGER_RTT_MODE_NO_BLOCK_TRIM
default 0
Expand Down
2 changes: 0 additions & 2 deletions subsys/debug/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Copyright (c) 2015 Wind River Systems, Inc.
# SPDX-License-Identifier: Apache-2.0

DT_CHOSEN_Z_CONSOLE := zephyr,console

menu "System Monitoring Options"

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


endmenu
18 changes: 14 additions & 4 deletions subsys/tracing/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config TRACING
bool "Enabling Tracing"
imply THREAD_NAME
imply THREAD_STACK_INFO
imply THREAD_MONITOR
help
Enable system tracing. This requires a backend such as SEGGER
Systemview to be enabled as well.
Expand All @@ -20,9 +21,20 @@ choice
prompt "Tracing Format"
default TRACING_CTF

config SEGGER_SYSTEMVIEW
bool "Segger SystemView support"
select CONSOLE
select RTT_CONSOLE
select USE_SEGGER_RTT

config TRACING_SYSTEMVIEW
bool "Tracing via SEGGER Systemview support"
help
Enable tracing using SEGGER Systemview.

config TRACING_CTF
bool "Tracing via Common Trace Format support"
select THREAD_MONITOR

help
Enable tracing to a Common Trace Format stream.

Expand Down Expand Up @@ -165,8 +177,6 @@ endif

config TRACING_CPU_STATS
bool "Enable CPU usage tracing"
select THREAD_MONITOR
select THREAD_STACK_INFO
select TRACING
help
Module provides information about percent of CPU usage based on
Expand All @@ -189,4 +199,4 @@ config TRACING_CPU_STATS_INTERVAL
Time period of displaying information about CPU usage.


source "subsys/tracing/Kconfig.segger"
source "subsys/tracing/sysview/Kconfig"
15 changes: 15 additions & 0 deletions subsys/tracing/sysview/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2016 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

if SEGGER_SYSTEMVIEW

config SEGGER_SYSTEMVIEW_BOOT_ENABLE
bool "Start logging SystemView events on system start"
depends on SEGGER_SYSTEMVIEW

config SEGGER_SYSVIEW_RTT_BUFFER_SIZE
int "Buffer size for SystemView RTT"
depends on SEGGER_SYSTEMVIEW
default 4096

endif

0 comments on commit fad8701

Please sign in to comment.