cancel
Showing results for 
Search instead for 
Did you mean: 

How to redirect Printf to SWV Console in TrueStudio?

karthik.arunachalam
Associate II

I have followed step-by-step set up as explained in http://blog.atollic.com/cortex-m-debugging-real-time-variable-watch-using-swv/swo but it didnt work for me. I get sometimes some random characters printed on the SWV console.

My setup:

IDE: TrueStudio

Hardware: NUCLEO-F410RB

Programmer: On-board ST-Link

Let me know if you need further details.

18 REPLIES 18
karthik.arunachalam
Associate II

ok, i checked that

0690X000006CKJ9QAO.png

karthik.arunachalam
Associate II

I dont understand... now it works even with the external crystal.

karthik.arunachalam
Associate II

Please ignore my previous comment, the wasnt cleaned up so it was working with HSI not with HSE.

MFend
Associate III

Is there such an article for STM32CubeIDE?

Now that I've migrated to STM32CubeIDE from Atollic TS, I can't get the SWV console to show printf messages.

Pavel A.
Evangelist III

@MFend​  Please see this thread. No replies yet... so ...

MFend
Associate III

The SWV ITM Data Console is working!

In Debug Mode - choose Window -> Show View -> SWV -> SWV ITM Data Console

When the SWV is opened, choose configure (wrench/screwdriver icon) and make sure that Hz rate is correct (can be set in Debug dialog when connecting with ST-Link or Segger-Link) - and check Port 0 (towards bottom of screen on far right - see attached.

MFend
Associate III
 
MFend
Associate III

of course syscalls must be included in the Src files of the project

Miles1
Associate III

So glad to finally get this working! Lots of small configurations to overlook.

To clarify for future readers, I believe "Core Clock" needs to match SYSCLK in the clock config tree.