cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 : Activating SWO with CubeMX and TrueSTUDIO

eymarf
Associate II

Hello,

I'm independent developer involved in a STM32H7 project.

I need to activate traces in SWV console of TrueSTUDIO.

I've attached my .io CubeMX project, I think it is well configured.

I've configured in the debugger tab of TrueStudio : SWD // SWV checkbox

I've checked the port 0 of "ITM Stimulus ports" zone in the "Configure Trace" window and activated "Start Trace" button.

Finally in the main loop of my program i've added : ITM_SendChar('T');

Nothing appear in the SWC console, is anybody can help ?

1 ACCEPTED SOLUTION

Accepted Solutions

Cut-n-paste from a phone is super difficult

There is a C function in one of posts that sets things up properly for Keil and ST-LINK Utilities SWV window. You don't even have to pick the right frequency

https://community.st.com/s/question/0D50X00009ce0vWSAQ/nucleoh743zi-board-and-printf-swo-not-working

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

7 REPLIES 7
Emin Yagmahan
Associate II

Hello,

there is a very good article on how to the use SWO with TrueStudio in the Atollic Forum. Maybe this will help you to get some data out:

http://blog.atollic.com/cortex-m-debugging-printf-redirection-to-a-debugger-console-using-swv/itm-part-1

Good Luck,

Emin Yagmahan

The topic of SWV on the H7 has been discussed here several times. You either need to enable it via a debugger script or embed a C function to achieve the same. Do a quick search. ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi,

Many thanks for your quick reply, I really appreciate.

Unfortunately I have already read this useful article but this does not resolve my problem :(

eymarf
Associate II

Hello,

I've searched all the day and read a lot of posts and it was very helpful. I think I have all configured at best but something remain wrong and it's for that reason I have poste my ".io" file.

If someone can help me I'll really appreciate.

Cut-n-paste from a phone is super difficult

There is a C function in one of posts that sets things up properly for Keil and ST-LINK Utilities SWV window. You don't even have to pick the right frequency

https://community.st.com/s/question/0D50X00009ce0vWSAQ/nucleoh743zi-board-and-printf-swo-not-working

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

It WORK! You are amazing! Thank you very very much i'm very impressed. Thank you again :)

Thanks. A lot of content seems to have gotten damaged or broken in the last forum migration. The search here is also pretty poorly executed, shame on SalesForce

@Torsten Jaekel​ did a lot of the pushing of this topic, and I think @Nawres GHARBI​ for the scripting.

https://community.st.com/s/question/0D50X00009XkhURSAZ/stm32h7-swo-printf-not-working

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..