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

..--

boards/03-Apr-2024-3628

src/03-Apr-2024-17293

CMakeLists.txtD03-Apr-2024362 149

README.rstD03-Apr-20242.6 KiB11480

prj.confD03-Apr-2024144 84

prj_native_ctf.confD03-Apr-2024125 65

prj_percepio.confD03-Apr-2024151 75

prj_sysview.confD03-Apr-2024152 65

prj_uart.confD03-Apr-2024129 65

prj_uart_ctf.confD03-Apr-2024100 54

prj_usb.confD03-Apr-2024242 119

prj_usb_ctf.confD03-Apr-2024264 1210

prj_user.confD03-Apr-202467 43

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