Debugging with ITM not working with SWV in STM32CubeIDE
I am successfully using all the SWV debugging functionality in STM32CubeIDE except for the ITM functionality, as described in UM1609 and in the advanced debugging videos on youtube from ST.
I have both tried overriding the "_write " function in main.cpp or replacing "__IO_putchar" with "ITM_SendChar" in syscalls.c, but I don't see any output when using printf and ITM port 0 (described in video 4 and section 4.3.5 in UM1609).
I have further tested sending output to ITM port 31, as described in video 5, but still cannot see any output.
Some details and further questions
- SWO is left unconnected - Do I need to connect the SWO to some other pin to make ITM work?
- I am running at 180 MHz clock speed - Is this too fast for ITM?
- Does it matter if I compile for cpp rather than c?
- Are there any benefits to updating an ITM port, like in video 5, rather than updating a global variable and observing the execution order by looking at a graph in a SWV Data Trace Timeline Graph or in CubeMonitor?
- Any further suggestions of why I can make all but ITM work for me with Nucleo-F446RE?
