2025-10-27 11:02 PM
Hello everyone,
I’m using an STM32MP157F-DK2 board and trying to use one of the Cortex-M4 debugging features — ITM (Instrumentation Trace Macrocell).
However, I’m receiving garbage values on the SWV console, and I’m not sure why.
Here’s what I’ve done so far:
Edited the int _write() function in syscalls.c to redirect output to ITM
Enabled Serial Wire Viewer (SWV) in the debug configuration.
Set the core clock frequency in the debugger to match the MCU clock (as configured in the .ioc file).
These are the typical steps I follow to enable ITM output.
Is there anything else required to get correct SWV output?
Am I missing any configuration or initialization step specific to the STM32MP1 series?
Thanks in advance for any help or insights!