Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
boards/ | 03-Aug-2024 | - | 36 | 28 | ||
src/ | 03-Aug-2024 | - | 172 | 93 | ||
CMakeLists.txt | D | 03-Aug-2024 | 362 | 14 | 9 | |
README.rst | D | 03-Aug-2024 | 2.6 KiB | 116 | 82 | |
prj.conf | D | 03-Aug-2024 | 144 | 8 | 4 | |
prj_native_ctf.conf | D | 03-Aug-2024 | 125 | 6 | 5 | |
prj_percepio.conf | D | 03-Aug-2024 | 151 | 7 | 5 | |
prj_sysview.conf | D | 03-Aug-2024 | 152 | 6 | 5 | |
prj_uart.conf | D | 03-Aug-2024 | 129 | 6 | 5 | |
prj_uart_ctf.conf | D | 03-Aug-2024 | 100 | 5 | 4 | |
prj_usb.conf | D | 03-Aug-2024 | 242 | 11 | 9 | |
prj_usb_ctf.conf | D | 03-Aug-2024 | 264 | 12 | 10 | |
prj_user.conf | D | 03-Aug-2024 | 67 | 4 | 3 | |
sample.yaml | D | 03-Aug-2024 | 2.1 KiB | 81 | 80 |
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