Skip to content

Commit

Permalink
doc: tracing: Use SystemView RTT tracing snippet
Browse files Browse the repository at this point in the history
Refactors the SystemView tracing documentation to use the rtt-tracing
snippet.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
  • Loading branch information
MaureenHelm authored and carlescufi committed Oct 23, 2024
1 parent 36d8131 commit dc9e0cb
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions doc/services/tracing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -372,24 +372,20 @@ relies on RTT as a transport. Newer versions of SystemView support other
transports, for example UART or using snapshot mode (both still not
supported in Zephyr).

To enable tracing support with `SEGGER SystemView`_ add the configuration option
:kconfig:option:`CONFIG_SEGGER_SYSTEMVIEW` to your project configuration file and set
it to *y*. For example, this can be added to the
:zephyr:code-sample:`synchronization` sample to visualize fast switching between threads.
To enable tracing support with `SEGGER SystemView`_ add the
:ref:`snippet-rtt-tracing` to your build command:

.. zephyr-app-commands::
:zephyr-app: samples/synchronization
:board: <board>
:snippets: rtt-tracing
:goals: build
:compact:

SystemView can also be used for post-mortem tracing, which can be enabled with
:kconfig:option:`CONFIG_SEGGER_SYSVIEW_POST_MORTEM_MODE`. In this mode, a debugger can
be attached after the system has crashed using ``west attach`` after which the
latest data from the internal RAM buffer can be loaded into SystemView::

CONFIG_STDOUT_CONSOLE=y
# enable to use thread names
CONFIG_THREAD_NAME=y
CONFIG_SEGGER_SYSTEMVIEW=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_TRACING=y
# enable for post-mortem tracing
CONFIG_SEGGER_SYSVIEW_POST_MORTEM_MODE=n

latest data from the internal RAM buffer can be loaded into SystemView.

.. figure:: segger_systemview.png
:align: center
Expand Down

0 comments on commit dc9e0cb

Please sign in to comment.