You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For targets with Arm CoreSight (e.g. Cortex-M3 and Cortex-M4) the Instrumented Trace Macrocell provides a lightweight, non-intrusive way for collecting debug trace output.
3
+
For targets with Arm CoreSight (for example, Cortex-M3 and Cortex-M4), the Instrumented Trace Macrocell provides a lightweight, nonintrusive way to collect debug trace output.
4
4
5
5
#### Assumptions
6
6
7
-
* The target supports Arm CoreSight.
8
-
* The target has SWO connected either to a compatible interface chip or exposed as a debug pin.
7
+
- The target supports Arm CoreSight.
8
+
- The target has SWO connected either to a compatible interface chip or exposed as a debug pin.
9
9
10
10
##### Defined behavior
11
11
12
-
* Targets must implement the function `void itm_init(void)` and add `ITM` to the `device_has` section in `target.json`.
13
-
* When `void itm_init(void)` is called, the debug clock for the ITM must be initialized and the SWO pin configured for debug output.
14
-
*`void itm_init(void)`should only have to modify the clock pre-scaler in the generic register `TPI->ACPR`. The generic ITM registers will be initialized by the helper function `mbed_itm_init`.
15
-
*`void itm_init(void)`will only be called once during startup and doesn't have to be protected for multiple calls.
12
+
- Targets must implement the function `void itm_init(void)` and add `ITM` to the `device_has` section in `target.json`.
13
+
- When `void itm_init(void)` is called, the debug clock for the ITM must be initialized and the SWO pin configured for debug output.
14
+
-`void itm_init(void)` only has to modify the clock prescaler in the generic register `TPI->ACPR`. The helper function `mbed_itm_init` initializes the generic ITM registers.
15
+
-`void itm_init(void)`is only called once during startup and doesn't have to be protected for multiple calls.
16
16
17
17
##### Undefined behavior
18
18
19
-
* The debug clock frequency is left undefined since the most optimal frequency will vary from target to target. It is up to each target's owner to pick a frequency that (a) doesn't interfere with normal operation and (b) is supported by the owner's preferred debug monitor.
19
+
- The debug clock frequency is left undefined because the most optimal frequency varies from target to target. It is up to each target's owner to choose a frequency that doesn't interfere with normal operation and that the owner's preferred debug monitor supports.
20
20
21
21
#### Testing
22
22
23
-
The `SerialWireOutput` class can be used for sending`stdout` to the SWO stimulus port on the ITM by including this override function:
23
+
You can use the `SerialWireOutput` to send`stdout` to the SWO stimulus port on the ITM by including this override function:
0 commit comments