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
In the terminal UI, run/monitor to follow these steps in a browser, or use the serial sidebar. See Use the terminal UI.
- Open a Serial Monitor tab. See Open a Serial Monitor tab.
- Select the port chip at the start of the toolbar, then choose the ITM entry under Port. The SWO trace settings appear below the list.
- Select Target and choose the OpenOCD target configuration for your MCU, such as
stm32f4x. A star marks the suggested target. - Enter the CPU clock in MHz in CPU. It has no default.
- Enter the SWO rate in MHz in SWO. 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.SWO must not exceed CPU frequency: lower SWO or correct CPU.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 and SWO to match the firmware.
- No send box: ITM is read-only. Use UART or RTT for firmware input.