Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


SWO debugging not working

Hello,

I’m trying to output data through the SWO but I don’t even see anything happening on the PB3 pin using an oscilloscope.

I don’t want to use semihosting, and I don’t even need printf to work either. I simply want to output chars on the SWO line. I’ve read dozens of posts on this forum and others, and as many suggest I’m simply calling ITM_SendChar(uint32_t ch), but it doesn’t do anything. More precisely, if debugging with checkpoints, I can see that the following check in this function doesn’t pass:

if ((ITM->TCR & ITM_TCR_ITMENA_Msk) && /* ITM enabled */
     (ITM->TER & (1UL << 0))) /* ITM Port #0 enabled */

is always false. So it makes me think something is maybe not initialized correctly? By the way I’m not using code generated by CubeMX, is there anything I should do to allow SWO (ITM) to be used?

My process for testing is to launch debugging inside System Workbench for STM32, start the code, and then stop it, open the ST-LINK Utility “Printf via SWO viewer” and start it with my system clock (168000000 Hz, I’m on a stm32f405rg). I double checked that the PB3 pin is connected to the SWO header pin on my STLINK-V3. As mentioned, I’m also monitoring the PB3 pin with an oscilloscope, but nothing happens on it at any time during the process.

What am I doing wrong?
Thanks