|
| 1 | +.. _nrf-coresight-stm-sample: |
| 2 | + |
| 3 | +Coresight STM demo |
| 4 | +################## |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +This sample presents how to enable STM logging on nRF54H20 platform. |
| 10 | +Also, it prints timing for different log messages. |
| 11 | +Thus, performance of different loggers can be compared. |
| 12 | + |
| 13 | +Sample has three configurations: |
| 14 | +#. 'sample.boards.nrf.coresight_stm.local_uart' |
| 15 | +This configuration doesn't use STM. Logs are printed on local console. |
| 16 | +#. 'sample.boards.nrf.coresight_stm' |
| 17 | +This configuration use STM. Application and Radio cores send logs to ETR buffer. |
| 18 | +Proxy (Application core) gets logs from the ETR buffer, decodes STPv2 data |
| 19 | +and prints human readable logs on UART. |
| 20 | +#. 'sample.boards.nrf.coresight_stm.dict' |
| 21 | +This sample uses STM logging in dictionary mode. Application and Radio cores |
| 22 | +send logs to ETR buffer. Proxy (Application core) forwards data from ETR to |
| 23 | +the host using UART. Host tool is needed to decode the logs. |
| 24 | + |
| 25 | +Requirements |
| 26 | +************ |
| 27 | + |
| 28 | +This application uses nRF54H20 DK board for the demo. |
| 29 | + |
| 30 | +Building and running |
| 31 | +******************** |
| 32 | + |
| 33 | +To build the sample, use configuration setups from :file:`sample.yaml` using the ``-T`` option. |
| 34 | +See the following examples: |
| 35 | + |
| 36 | +nRF54H20 DK |
| 37 | + You can build the test for application and radio cores as follows: |
| 38 | + |
| 39 | + .. code-block:: console |
| 40 | +
|
| 41 | + west build -p -b nrf54h20dk/nrf54h20/cpuapp -T sample.boards.nrf.coresight_stm . |
| 42 | +
|
| 43 | +Sample Output |
| 44 | +============= |
| 45 | + |
| 46 | +.. code-block:: console |
| 47 | +
|
| 48 | + *** Using Zephyr OS v3.6.99-5bb7bb0af17c *** |
| 49 | + [00:00:00.385,817] <inf> rad/app: test with one argument 100 |
| 50 | + [00:00:00.385,827] <inf> rad/app: test with one argument 100 |
| 51 | + [00:00:00.385,832] <inf> rad/app: test with one argument 100 |
| 52 | + [00:00:00.385,836] <inf> rad/app: test with one argument 100 |
| 53 | + [00:00:00.385,841] <inf> rad/app: test with one argument 100 |
| 54 | + [00:00:00.385,846] <inf> rad/app: test with one argument 100 |
| 55 | + [00:00:00.385,851] <inf> rad/app: test with one argument 100 |
| 56 | + [00:00:00.385,856] <inf> rad/app: test with one argument 100 |
| 57 | + [00:00:00.385,860] <inf> rad/app: test with one argument 100 |
| 58 | + [00:00:00.385,865] <inf> rad/app: test with one argument 100 |
| 59 | + [00:00:00.424,091] <inf> app/app: test with one argument 100 |
| 60 | + [00:00:00.424,094] <inf> app/app: test with one argument 100 |
| 61 | + [00:00:00.424,096] <inf> app/app: test with one argument 100 |
| 62 | + [00:00:00.424,097] <inf> app/app: test with one argument 100 |
| 63 | + [00:00:00.424,099] <inf> app/app: test with one argument 100 |
| 64 | + [00:00:00.424,100] <inf> app/app: test with one argument 100 |
| 65 | + [00:00:00.424,102] <inf> app/app: test with one argument 100 |
| 66 | + [00:00:00.424,104] <inf> app/app: test with one argument 100 |
| 67 | + [00:00:00.424,105] <inf> app/app: test with one argument 100 |
| 68 | + [00:00:00.424,108] <inf> app/app: test with one argument 100 |
| 69 | + [00:00:00.585,056] <inf> rad/app: test with two arguments 100 10 |
| 70 | + [00:00:00.585,065] <inf> rad/app: test with two arguments 100 10 |
| 71 | + [00:00:00.585,070] <inf> rad/app: test with two arguments 100 10 |
| 72 | + [00:00:00.585,075] <inf> rad/app: test with two arguments 100 10 |
| 73 | + [00:00:00.585,080] <inf> rad/app: test with two arguments 100 10 |
| 74 | + [00:00:00.585,086] <inf> rad/app: test with two arguments 100 10 |
| 75 | + [00:00:00.585,091] <inf> rad/app: test with two arguments 100 10 |
| 76 | + [00:00:00.585,096] <inf> rad/app: test with two arguments 100 10 |
| 77 | + [00:00:00.585,100] <inf> rad/app: test with two arguments 100 10 |
| 78 | + [00:00:00.585,105] <inf> rad/app: test with two arguments 100 10 |
| 79 | + [00:00:00.623,262] <inf> app/app: test with two arguments 100 10 |
| 80 | + [00:00:00.623,265] <inf> app/app: test with two arguments 100 10 |
| 81 | + [00:00:00.623,267] <inf> app/app: test with two arguments 100 10 |
| 82 | + [00:00:00.623,268] <inf> app/app: test with two arguments 100 10 |
| 83 | + [00:00:00.623,272] <inf> app/app: test with two arguments 100 10 |
| 84 | + [00:00:00.623,273] <inf> app/app: test with two arguments 100 10 |
| 85 | + [00:00:00.623,275] <inf> app/app: test with two arguments 100 10 |
| 86 | + [00:00:00.623,276] <inf> app/app: test with two arguments 100 10 |
| 87 | + [00:00:00.623,278] <inf> app/app: test with two arguments 100 10 |
| 88 | + [00:00:00.623,280] <inf> app/app: test with two arguments 100 10 |
| 89 | + [00:00:00.784,382] <inf> rad/app: test with three arguments 100 10 1 |
| 90 | + [00:00:00.784,392] <inf> rad/app: test with three arguments 100 10 1 |
| 91 | + [00:00:00.784,398] <inf> rad/app: test with three arguments 100 10 1 |
| 92 | + [00:00:00.784,403] <inf> rad/app: test with three arguments 100 10 1 |
| 93 | + [00:00:00.784,409] <inf> rad/app: test with three arguments 100 10 1 |
| 94 | + [00:00:00.784,414] <inf> rad/app: test with three arguments 100 10 1 |
| 95 | + [00:00:00.784,419] <inf> rad/app: test with three arguments 100 10 1 |
| 96 | + [00:00:00.784,425] <inf> rad/app: test with three arguments 100 10 1 |
| 97 | + [00:00:00.784,430] <inf> rad/app: test with three arguments 100 10 1 |
| 98 | + [00:00:00.784,436] <inf> rad/app: test with three arguments 100 10 1 |
| 99 | + [00:00:00.822,484] <inf> app/app: test with three arguments 100 10 1 |
| 100 | + [00:00:00.822,488] <inf> app/app: test with three arguments 100 10 1 |
| 101 | + [00:00:00.822,489] <inf> app/app: test with three arguments 100 10 1 |
| 102 | + [00:00:00.822,491] <inf> app/app: test with three arguments 100 10 1 |
| 103 | + [00:00:00.822,492] <inf> app/app: test with three arguments 100 10 1 |
| 104 | + [00:00:00.822,494] <inf> app/app: test with three arguments 100 10 1 |
| 105 | + [00:00:00.822,497] <inf> app/app: test with three arguments 100 10 1 |
| 106 | + [00:00:00.822,499] <inf> app/app: test with three arguments 100 10 1 |
| 107 | + [00:00:00.822,500] <inf> app/app: test with three arguments 100 10 1 |
| 108 | + [00:00:00.822,502] <inf> app/app: test with three arguments 100 10 1 |
| 109 | + [00:00:00.983,660] <inf> rad/app: test with string test string |
| 110 | + [00:00:00.983,673] <inf> rad/app: test with string test string |
| 111 | + [00:00:00.983,678] <inf> rad/app: test with string test string |
| 112 | + [00:00:00.983,684] <inf> rad/app: test with string test string |
| 113 | + [00:00:00.983,691] <inf> rad/app: test with string test string |
| 114 | + [00:00:00.983,697] <inf> rad/app: test with string test string |
| 115 | + [00:00:00.983,702] <inf> rad/app: test with string test string |
| 116 | + [00:00:00.983,708] <inf> rad/app: test with string test string |
| 117 | + [00:00:00.983,715] <inf> rad/app: test with string test string |
| 118 | + [00:00:00.983,720] <inf> rad/app: test with string test string |
| 119 | + [00:00:01.021,668] <inf> app/app: test with string test string |
| 120 | + [00:00:01.021,678] <inf> app/app: test with string test string |
| 121 | + [00:00:01.021,681] <inf> app/app: test with string test string |
| 122 | + [00:00:01.021,684] <inf> app/app: test with string test string |
| 123 | + [00:00:01.021,688] <inf> app/app: test with string test string |
| 124 | + [00:00:01.021,692] <inf> app/app: test with string test string |
| 125 | + [00:00:01.021,696] <inf> app/app: test with string test string |
| 126 | + [00:00:01.021,699] <inf> app/app: test with string test string |
| 127 | + [00:00:01.021,702] <inf> app/app: test with string test string |
| 128 | + [00:00:01.021,707] <inf> app/app: test with string test string |
| 129 | + [00:00:01.182,876] rad/tp: 5 |
| 130 | + [00:00:01.182,876] rad/tp: 5 |
| 131 | + [00:00:01.182,876] rad/tp: 5 |
| 132 | + [00:00:01.182,876] rad/tp: 5 |
| 133 | + [00:00:01.182,876] rad/tp: 5 |
| 134 | + [00:00:01.182,878] rad/tp: 5 |
| 135 | + [00:00:01.182,878] rad/tp: 5 |
| 136 | + [00:00:01.182,878] rad/tp: 5 |
| 137 | + [00:00:01.182,878] rad/tp: 5 |
| 138 | + [00:00:01.182,878] rad/tp: 5 |
| 139 | + [00:00:01.182,878] rad/tp: 5 |
| 140 | + [00:00:01.182,878] rad/tp: 5 |
| 141 | + [00:00:01.182,878] rad/tp: 5 |
| 142 | + [00:00:01.182,878] rad/tp: 5 |
| 143 | + [00:00:01.182,878] rad/tp: 5 |
| 144 | + [00:00:01.182,878] rad/tp: 5 |
| 145 | + [00:00:01.182,878] rad/tp: 5 |
| 146 | + [00:00:01.182,878] rad/tp: 5 |
| 147 | + [00:00:01.182,878] rad/tp: 5 |
| 148 | + [00:00:01.182,878] rad/tp: 5 |
| 149 | + [00:00:01.220,788] app/tp: 5 |
| 150 | + [00:00:01.220,788] app/tp: 5 |
| 151 | + [00:00:01.220,788] app/tp: 5 |
| 152 | + [00:00:01.220,788] app/tp: 5 |
| 153 | + [00:00:01.220,788] app/tp: 5 |
| 154 | + [00:00:01.220,788] app/tp: 5 |
| 155 | + [00:00:01.220,788] app/tp: 5 |
| 156 | + [00:00:01.220,788] app/tp: 5 |
| 157 | + [00:00:01.220,788] app/tp: 5 |
| 158 | + [00:00:01.220,788] app/tp: 5 |
| 159 | + [00:00:01.220,790] app/tp: 5 |
| 160 | + [00:00:01.220,790] app/tp: 5 |
| 161 | + [00:00:01.220,790] app/tp: 5 |
| 162 | + [00:00:01.220,790] app/tp: 5 |
| 163 | + [00:00:01.220,790] app/tp: 5 |
| 164 | + [00:00:01.220,790] app/tp: 5 |
| 165 | + [00:00:01.220,790] app/tp: 5 |
| 166 | + [00:00:01.220,790] app/tp: 5 |
| 167 | + [00:00:01.220,790] app/tp: 5 |
| 168 | + [00:00:01.220,790] app/tp: 5 |
| 169 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 170 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 171 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 172 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 173 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 174 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 175 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 176 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 177 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 178 | + [00:00:01.382,048] rad/tp: 6 0000000a |
| 179 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 180 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 181 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 182 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 183 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 184 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 185 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 186 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 187 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 188 | + [00:00:01.382,049] rad/tp: 6 0000000a |
| 189 | + [00:00:01.419,950] app/tp: 6 0000000a |
| 190 | + [00:00:01.419,950] app/tp: 6 0000000a |
| 191 | + [00:00:01.419,950] app/tp: 6 0000000a |
| 192 | + [00:00:01.419,950] app/tp: 6 0000000a |
| 193 | + [00:00:01.419,950] app/tp: 6 0000000a |
| 194 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 195 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 196 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 197 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 198 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 199 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 200 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 201 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 202 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 203 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 204 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 205 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 206 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 207 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 208 | + [00:00:01.419,952] app/tp: 6 0000000a |
| 209 | + rad: Timing for log message with 0 arguments: 6.60us |
| 210 | + rad: Timing for log message with 1 argument: 5.80us |
| 211 | + rad: Timing for log message with 2 arguments: 6.0us |
| 212 | + rad: Timing for log message with 3 arguments: 6.40us |
| 213 | + rad: Timing for log_message with string: 7.10us |
| 214 | + rad: Timing for tracepoint: 0.5us |
| 215 | + rad: Timing for tracepoint_d32: 0.5us |
| 216 | + app: Timing for log message with 0 arguments: 3.20us |
| 217 | + app: Timing for log message with 1 argument: 2.10us |
| 218 | + app: Timing for log message with 2 arguments: 2.10us |
| 219 | + app: Timing for log message with 3 arguments: 2.0us |
| 220 | + app: Timing for log_message with string: 4.50us |
| 221 | + app: Timing for tracepoint: 0.10us |
| 222 | + app: Timing for tracepoint_d32: 0.10us |
| 223 | +
|
| 224 | +See OS Services » Logging » Multi-domain logging using ARM Coresight STM` for details. |
0 commit comments