Skip to content

Commit 781b6d7

Browse files
fg-cfhcfriedt
authored andcommitted
samples/doc: segger: rtt: enhanced tracing/logging
Fixes a minor documentation issue and suggests/documents additional RTT tracing and logging options. Showcases logging via RTT UART which is now available w/o restrictions due to the preceding change. This has been tested on CC13/26xx hardware. Signed-off-by: Florian Grandel <[email protected]>
1 parent 6262304 commit 781b6d7

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

doc/services/tracing/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ file available in the tree to your local configuration directory to override the
139139
builtin table::
140140

141141
# On Linux and MacOS
142-
cp ZEPHYR_BASE/subsys/tracing/sysview/SYSVIEW_Zephyr.txt ~/.config/SEGGER/
142+
cp $ZEPHYR_BASE/subsys/tracing/sysview/SYSVIEW_Zephyr.txt ~/.config/SEGGER/
143143

144144
User-Defined Tracing
145145
====================
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_USE_SEGGER_RTT=y
2+
CONFIG_UART_RTT=y
3+
CONFIG_UART_ASYNC_API=y
4+
CONFIG_LOG_BACKEND_UART_ASYNC=y
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
/ {
4+
chosen {
5+
zephyr,console = &rtt0;
6+
};
7+
8+
rtt0: rtt_chan0 {
9+
compatible = "segger,rtt-uart";
10+
status = "okay";
11+
};
12+
};

samples/subsys/tracing/prj.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# enable to use thread names
22
CONFIG_THREAD_NAME=y
33
CONFIG_MP_MAX_NUM_CPUS=1
4+
5+
# Debugging
6+
CONFIG_DEBUG_OPTIMIZATIONS=n
47
CONFIG_DEBUG_THREAD_INFO=y
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
CONFIG_TRACING=y
22
CONFIG_SEGGER_SYSTEMVIEW=y
33
CONFIG_IDLE_STACK_SIZE=2048
4+
CONFIG_SEGGER_SYSTEMVIEW_BOOT_ENABLE=n
5+
CONFIG_SEGGER_SYSVIEW_POST_MORTEM_MODE=n

0 commit comments

Comments
 (0)