• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/29-Dec-2025-3023

src/29-Dec-2025-298178

CMakeLists.txtD29-Dec-2025495 1611

KconfigD29-Dec-2025373 107

README.rstD29-Dec-20253.1 KiB13595

gpio.overlayD29-Dec-2025299 2018

prj.confD29-Dec-2025144 84

prj_gpio.confD29-Dec-2025213 1110

prj_native_ctf.confD29-Dec-2025125 65

prj_percepio.confD29-Dec-2025151 75

prj_uart.confD29-Dec-2025129 65

prj_uart_ctf.confD29-Dec-2025100 54

prj_usb_ctf.confD29-Dec-2025244 119

prj_user.confD29-Dec-202567 43

sample.yamlD29-Dec-20252.5 KiB9493

README.rst

1.. zephyr:code-sample:: tracing
2   :name: Tracing
3
4   Send tracing formatted packet to the host with supported backends.
5
6This application can be used to demonstrate the tracing feature. The tracing
7formatted packet will be sent to the host with the currently supported tracing
8backend under tracing generic infrastructure.
9
10Requirements
11************
12
13Depends of the boards which you are using, choose one of .conf files for use tracing subsys.
14
15Usage for UART Tracing Backend
16******************************
17
18Build a UART-tracing image with:
19
20.. zephyr-app-commands::
21	:zephyr-app: samples/subsys/tracing
22	:board: mps2/an521
23	:conf: "prj_uart.conf"
24	:goals: build
25	:compact:
26
27or:
28
29.. zephyr-app-commands::
30	:zephyr-app: samples/subsys/tracing
31	:board: mps2/an521
32	:conf: "prj_uart_ctf.conf"
33	:goals: build
34	:compact:
35
36.. note::
37   You may need to set "zephyr,tracing-uart" property under the chosen node in your devicetree.
38   See :zephyr_file:`samples/subsys/tracing/boards/mps2_an521_cpu0.overlay` for an example.
39
40After the application has run for a while, check the trace output file.
41
42Usage for USB Tracing Backend
43*****************************
44
45Build a USB-tracing image with:
46
47.. zephyr-app-commands::
48	:zephyr-app: samples/subsys/tracing
49	:board: reel_board
50	:conf: "prj_usb_ctf.conf"
51	:goals: build
52	:compact:
53
54After the serial console has stable output like this:
55
56.. code-block:: console
57
58	threadA: Hello World!
59	threadB: Hello World!
60	threadA: Hello World!
61	threadB: Hello World!
62
63Connect the board's USB port to the host device and
64run the :zephyr_file:`scripts/tracing/trace_capture_usb.py` script on the host:
65
66.. code-block:: console
67
68	sudo python3 trace_capture_usb.py -v 0x2FE3 -p 0x0001 -o channel0_0
69
70The VID and PID of USB device can be configured, just adjusting it accordingly.
71
72Usage for POSIX Tracing Backend
73*******************************
74
75Build a POSIX-tracing image with:
76
77.. zephyr-app-commands::
78	:zephyr-app: samples/subsys/tracing
79	:board: native_sim
80	:goals: build
81	:compact:
82
83or:
84
85.. zephyr-app-commands::
86	:zephyr-app: samples/subsys/tracing
87	:board: native_sim
88	:conf: "prj_native_ctf.conf"
89	:goals: build
90	:compact:
91
92After the application has run for a while, check the trace output file.
93
94Usage for USER Tracing Backend
95*******************************
96
97Build a USER-tracing image with:
98
99.. zephyr-app-commands::
100	:zephyr-app: samples/subsys/tracing
101	:board: qemu_x86
102	:conf: "prj_user.conf"
103	:goals: build
104	:compact:
105
106After the application has run for a while, check the trace output file.
107
108Usage for SEGGER SystemView RTT
109*******************************
110
111Build a SystemView-tracing image with the :ref:`snippet-rtt-tracing`:
112
113.. zephyr-app-commands::
114	:zephyr-app: samples/subsys/tracing
115	:board: frdm_k64f
116	:snippets: rtt-tracing
117	:goals: build
118	:compact:
119
120After the application has run for a while, check the trace output file.
121
122Usage for GPIO Tracing Backend
123*******************************
124
125Build a GPIO-tracing image with:
126
127.. zephyr-app-commands::
128	:zephyr-app: samples/subsys/tracing
129	:board: native_sim
130	:conf: "prj_gpio.conf"
131	:goals: build
132	:compact:
133
134After the application has run for a while, check the trace output file.
135