diff --git a/drivers/Kconfig b/drivers/Kconfig index e606c7b37e9..f5f781176ed 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -13,6 +13,8 @@ source "drivers/lora/Kconfig" source "drivers/console/Kconfig" +source "drivers/debug/Kconfig" + source "drivers/ethernet/Kconfig" source "drivers/net/Kconfig" diff --git a/drivers/debug/Kconfig b/drivers/debug/Kconfig new file mode 100644 index 00000000000..a5bd0b8b0ac --- /dev/null +++ b/drivers/debug/Kconfig @@ -0,0 +1,4 @@ +# Copyright (c) 2020 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +source "drivers/debug/Kconfig.rtt" diff --git a/subsys/tracing/Kconfig.segger b/drivers/debug/Kconfig.rtt similarity index 79% rename from subsys/tracing/Kconfig.segger rename to drivers/debug/Kconfig.rtt index 6970e7d929e..a0d38f86e92 100644 --- a/subsys/tracing/Kconfig.segger +++ b/drivers/debug/Kconfig.rtt @@ -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 @@ -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 diff --git a/subsys/debug/Kconfig b/subsys/debug/Kconfig index 612586341ee..23be8d2481a 100644 --- a/subsys/debug/Kconfig +++ b/subsys/debug/Kconfig @@ -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" @@ -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 diff --git a/subsys/tracing/Kconfig b/subsys/tracing/Kconfig index 3eae325ca0f..20b51627782 100644 --- a/subsys/tracing/Kconfig +++ b/subsys/tracing/Kconfig @@ -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. @@ -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. @@ -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 @@ -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" diff --git a/subsys/tracing/sysview/Kconfig b/subsys/tracing/sysview/Kconfig new file mode 100644 index 00000000000..19baa908424 --- /dev/null +++ b/subsys/tracing/sysview/Kconfig @@ -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