Prepare
- Confirm that the MCU exposes ITM/SWO and that 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 doesn’t show that SWO is wired.
- Install OpenOCD on the computer running Embedder.
- Connect a supported SWO probe to that computer: ST-Link/V1, ST-Link/V2, ST-Link/V2-1, ST-Link/V3, DAPLink, NXP LPC-Link2, or NXP MCU-Link.
- Build firmware that enables the trace path and writes to the ITM stimulus ports you plan to read. End each channel 0 text line with
\n. - Note the CPU clock while the firmware logs, and the SWO rate it configures.
Configure and connect
- Open a Serial Monitor tab. See Open a Serial Monitor tab.
- Select the ITM entry in Port.
- Select Target and choose the OpenOCD target configuration for your MCU, such as
stm32f4x. A star marks the suggested target. - Enter CPU MHz. It has no default.
- Enter SWO MHz. The default is 2.
- Select Connect.
Starting OpenOCD with ITM.... If a debugger server is already running without ITM, the connection fails; stop that server and connect again. Review the attachment precautions when target state matters.
You can also ask Embedder to capture ITM output. Give the clocks and target that match your firmware:
Interpret the output
The view shows only software stimulus output. It doesn’t show ITM timestamps or hardware trace, such as DWT event counters, exception trace, PC sampling, or data trace, so it isn’t a complete event or instruction trace. See Coverage and trace for the trace workflows Embedder supports.
Troubleshoot
- No ITM entry in Port: install OpenOCD and connect a supported probe to the computer running Embedder.
- Target can’t be selected: no supported SWO probe is detected.
Configure OpenOCD target to use ITM: choose a Target before you connect.Enter CPU frequency to use ITM: enter the active CPU clock in CPU MHz.SWO must not exceed CPU frequency: lower SWO MHz or correct CPU MHz.ITM port not available. Ensure OpenOCD is configured for ITM.: a debugger server is running without ITM. Stop it, then connect again.- Connected but silent: check SWO wiring, trace initialization, enabled stimulus ports, and that the firmware is producing output.
- Channel 0 text is missing its last line: the firmware hasn’t sent the final
\n. - Text is corrupt after a clock change: update CPU MHz and SWO MHz to match the firmware.
- No send box: ITM is read-only. Use UART or RTT for firmware input.