Skip to main content
eymarf
Associate II
October 27, 2018
Solved

STM32H7 : Activating SWO with CubeMX and TrueSTUDIO

  • October 27, 2018
  • 3 replies
  • 2853 views

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 ?

This topic has been closed for replies.
Best answer by Tesla DeLorean

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

3 replies

Emin Yagmahan
Associate II
October 27, 2018

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

eymarf
eymarfAuthor
Associate II
October 27, 2018

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 :(

Tesla DeLorean
Guru
October 27, 2018

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 VenmoUp vote any posts that you find helpful, it shows what's working..
eymarf
eymarfAuthor
Associate II
October 27, 2018

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.

Tesla DeLorean
Guru
October 27, 2018

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 VenmoUp vote any posts that you find helpful, it shows what's working..
eymarf
eymarfAuthor
Associate II
October 27, 2018

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