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

..--

boards/03-Aug-2024-3628

src/03-Aug-2024-17293

CMakeLists.txtD03-Aug-2024362 149

README.rstD03-Aug-20242.6 KiB11682

prj.confD03-Aug-2024144 84

prj_native_ctf.confD03-Aug-2024125 65

prj_percepio.confD03-Aug-2024151 75

prj_sysview.confD03-Aug-2024152 65

prj_uart.confD03-Aug-2024129 65

prj_uart_ctf.confD03-Aug-2024100 54

prj_usb.confD03-Aug-2024242 119

prj_usb_ctf.confD03-Aug-2024264 1210

prj_user.confD03-Aug-202467 43

sample.yamlD03-Aug-20242.1 KiB8180

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: sam_e70_xplained/same70q21
50	:conf: "prj_usb.conf"
51	:goals: build
52	:compact:
53
54or:
55
56.. zephyr-app-commands::
57	:zephyr-app: samples/subsys/tracing
58	:board: sam_e70_xplained/same70q21
59	:conf: "prj_usb_ctf.conf"
60	:goals: build
61	:compact:
62
63After the serial console has stable output like this:
64
65.. code-block:: console
66
67	threadA: Hello World!
68	threadB: Hello World!
69	threadA: Hello World!
70	threadB: Hello World!
71
72Connect the board's USB port to the host device and
73run the :zephyr_file:`scripts/tracing/trace_capture_usb.py` script on the host:
74
75.. code-block:: console
76
77	sudo python3 trace_capture_usb.py -v 0x2FE9 -p 0x100 -o channel0_0
78
79The VID and PID of USB device can be configured, just adjusting it accordingly.
80
81Usage for POSIX Tracing Backend
82*******************************
83
84Build a POSIX-tracing image with:
85
86.. zephyr-app-commands::
87	:zephyr-app: samples/subsys/tracing
88	:board: native_sim
89	:goals: build
90	:compact:
91
92or:
93
94.. zephyr-app-commands::
95	:zephyr-app: samples/subsys/tracing
96	:board: native_sim
97	:conf: "prj_native_ctf.conf"
98	:goals: build
99	:compact:
100
101After the application has run for a while, check the trace output file.
102
103Usage for USER Tracing Backend
104*******************************
105
106Build a USER-tracing image with:
107
108.. zephyr-app-commands::
109	:zephyr-app: samples/subsys/tracing
110	:board: qemu_x86
111	:conf: "prj_user.conf"
112	:goals: build
113	:compact:
114
115After the application has run for a while, check the trace output file.
116