Skip to content

Commit 1f9e17f

Browse files
raiden00plAlan Carvalho de Assis
authored andcommitted
Documentation: add SystemView configuration instructions
1 parent caef223 commit 1f9e17f

File tree

1 file changed

+58
-4
lines changed
  • Documentation/components/drivers/special

1 file changed

+58
-4
lines changed

Documentation/components/drivers/special/segger.rst

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,63 @@
22
Segger RTT drivers
33
==================
44

5+
.. note:: Segger drivers works only with J-Link debug probes.
6+
Sometimes it's possible to replace vendor-specific debug interface
7+
with J-Link OB firmware. For details look at
8+
`Segger website <https://www.segger.com/downloads/jlink>`_
9+
510
Supported Segger drivers:
611

7-
- serial over RTT - ``CONFIG_SERIAL_RTTx``,
8-
- console over RTT - ``CONFIG_SERIAL_RTT_CONSOLE_CHANNEL``
9-
- Segger SystemView - ``CONFIG_SEGGER_SYSVIEW``
10-
- Note RTT - ``CONFIG_NOTE_RTT``
12+
* Serial over RTT - ``CONFIG_SERIAL_RTTx``,
13+
* Console over RTT - ``CONFIG_SERIAL_RTT_CONSOLE_CHANNEL``
14+
* Segger SystemView - ``CONFIG_SEGGER_SYSVIEW``
15+
* Note RTT - ``CONFIG_NOTE_RTT``
16+
17+
Segger SystemView
18+
=================
19+
20+
Steps to enable SystemView support:
21+
22+
#. Make sure your architecture supports a high-performance counter.
23+
In most cases it will be:
24+
25+
:menuselection:`CONFIG_ARCH_PERF_EVENTS=y`
26+
27+
In that case, the the architecture logic must initialize the perf counter
28+
with ``up_perf_init()``.
29+
30+
#. Enable instrumentation support:
31+
32+
:menuselection:`CONFIG_SCHED_INSTRUMENTATION=y`
33+
34+
#. Configure instrumentation support. Available options for SystemView are:
35+
36+
:menuselection:`CONFIG_SCHED_INSTRUMENTATION_SWITCH=y`
37+
38+
:menuselection:`CONFIG_SCHED_INSTRUMENTATION_SYSCALL=y`
39+
40+
:menuselection:`CONFIG_SCHED_INSTRUMENTATION_IRQHANDLER=y`
41+
42+
#. Make sure that ``CONFIG_TASK_NAME_SIZE > 0``, otherwise task/thread
43+
names will not be displayed correctly
44+
45+
#. Enable Note Driver support and disable Note RAM driver:
46+
47+
:menuselection:`CONFIG_DRIVERS_NOTE=y`
48+
49+
:menuselection:`CONFIG_DRIVERS_NOTERAM=n`
50+
51+
#. Enable Note RTT and Segger SystemView support:
52+
53+
:menuselection:`CONFIG_NOTE_RTT=y`
54+
55+
:menuselection:`CONFIG_SEGGER_SYSVIEW=y`
56+
57+
#. Configure RTT channel and RTT buffer size for SystemView:
58+
59+
:menuselection:`CONFIG_SEGGER_SYSVIEW_RTT_CHANNEL=0`
60+
61+
:menuselection:`CONFIG_SEGGER_SYSVIEW_RTT_BUFFER_SIZE=1024`
62+
63+
In case SystemView returns buffer overflow errors, you should increase
64+
``CONFIG_NOTE_RTT_BUFFER_SIZE_UP``.

0 commit comments

Comments
 (0)