Follow the steps in the video to enable using printf() statements while debugging on TrueSTUDIO. Github repo of the project used in the video: goo.gl/Tzr86y
Thanks very much ! Small addition: if you don't have a newline at the end of what you're printf-ing, nothing will show up until a very large buffer has been filled, then you get it all at once, on a single line. At least that's my experience.
I'm using a Nucleo-144, but in the Pinout&Configuration tab, under System Core / Sys, it doesn't show any Debug options, only Timebase Source. In the pinout view, I do see STLINK_TX/RX on PD9/PD8 (USART3). Any idea why there's no option to select Serial Wire vs Trace Async Sw? The ITM_SendChar for example, appears to go thru stlink/swd port, not USART3.
I have been using a UART for sending debug text. But that takes time. If I send e.g 10 characters with your solution, do you know how much time that takes?
@@atg1203 The problem was with the "Core Clock" setting under SWV. I went under "Clock Configuration" and on the very right down corner there was a block with "To TRACE (MHz)". It shows 320 MHz. It was confusing because my microcontroller (H7) is actually running at 480 MHz.
Thanks very much !
Small addition: if you don't have a newline at the end of what you're printf-ing, nothing will show up until a very large buffer has been filled, then you get it all at once, on a single line. At least that's my experience.
An important detail that is easily missed. I was stuck at this for some time. Thanks a lot.
very nice explanation, thank you Sir! you should keep making more videos...
Very nice job - this video was a great help.... Thank you!
I'm using a Nucleo-144, but in the Pinout&Configuration tab, under System Core / Sys, it doesn't show any Debug options, only Timebase Source. In the pinout view, I do see STLINK_TX/RX on PD9/PD8 (USART3). Any idea why there's no option to select Serial Wire vs Trace Async Sw? The ITM_SendChar for example, appears to go thru stlink/swd port, not USART3.
Спасибо. Для меня Ваш урок очень полезен
Please continue your tutors
I have been using a UART for sending debug text. But that takes time. If I send e.g 10 characters with your solution, do you know how much time that takes?
r can the nucleo-l432kc do the same thing? I mean print and plot the curve.
Good job 👏
Thank you! Cheers!
Is sys_clk in the clock configuration manager the same as core_clk?
Yes, that is correct.
It's not working on my STM32F103C8Tx. Do you have to connect anything to the pin PB3?
Not if you're using the Nucleo board.
@@atg1203 ok, then it looks like SWV doesn't work on the 'bluepill' stm32f103
@@roflcopter645 so what is the solution?
I did all the steps but i'm getting rubbish characters in the SWV console, what could be the problem?
Double check the clock settings.
@@atg1203 yes right, it is the HCLK frequency, i changed it and it is fixed now. Thanks!
I have try this but no get ouput on the port. I have use stm32cubeide software . Please solve the error.
What is the error?
@@atg1203
I have use swv port not give output.
@@think7677, same here
It just prints some strange question marks and sometimes other strange chars.
Double check the baud rate.
@@atg1203 The problem was with the "Core Clock" setting under SWV. I went under "Clock Configuration" and on the very right down corner there was a block with "To TRACE (MHz)". It shows 320 MHz. It was confusing because my microcontroller (H7) is actually running at 480 MHz.
@@atg1203 Now when I change my main.c to main.cpp it does not show anything :(
The problem was that _write() function was not called. Therefore I programmed my own print function with ITM_SendChar() and it worked.