Prepare
- Confirm that the MCU exposes ITM/SWO and the board routes SWO to the probe connector.
- Connect target ground, the debug interface, and SWO using the board and probe pinouts. A working SWD connection alone does not establish that SWO is wired.
- Install a compatible OpenOCD setup for the hardware host and probe. Select the exact OpenOCD target configuration.
- Build firmware that enables the trace path and writes to the intended ITM stimulus channels.
- Determine the CPU clock used while logging and the configured SWO rate.
Configure and read
Select the ITM connection in a Serial tab. Set CPU MHz and SWO MHz to the firmware’s actual clocks. Both must be positive, and the SWO rate must not exceed the CPU clock. For a target that actually uses these clock values:Interpret the output
Channel 0 is shown as newline-terminated text with ach0: prefix. Other stimulus channels appear as hexadecimal bytes with their channel number. Use the firmware’s channel definitions to interpret those bytes.
This view does not provide a complete hardware-event or instruction trace. Structured event recording requires compatible firmware trace instrumentation; arbitrary text or other trace formats are not interchangeable. Use Coverage and trace for the available trace workflows.
Troubleshoot
- OpenOCD target required: select a configuration for the exact MCU before connecting.
- CPU frequency required or invalid: enter the active CPU clock and a valid SWO rate in MHz.
- No ITM stream: check that the active OpenOCD setup enables ITM; an existing server without it must be reconfigured.
- Connected but silent: verify SWO wiring, trace initialization, channel enablement, and that firmware is producing output.
- Text is corrupt after a clock change: update the CPU and SWO settings to match the firmware.
- Send is blocked: ITM is read-only; use UART or RTT for firmware input.

