Debbug printf with Nucleo-h743zI2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-06 1:31 AM
Hi everyone,
Im pretty new with using stm32.
Im trying to debug and make printf output to the log.
I found alot of vidoes but got pretty lost.
Im confused about what is the way of doing it from the start.
I need to setup the external clock?
Then the trace asynchronous Sw?
Any explaination would be amazing, thanks!
Solved! Go to Solution.
- Labels:
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-06 5:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-06 3:00 AM - edited ‎2025-04-06 3:59 AM
@Ariel1 wrote:Im pretty new with using stm32.
Do you have any experience with any other microcontroller(s)? With C programming in general?
@Ariel1 wrote:Im confused about what is the way of doing it from the start.
The best thing is not to start with printf - that's getting rather advanced!
The first thing to do when starting with any new embedded platform is just to get a simple LED blinking.
"Blinky" is the embedded equivalent of "Hello, World".
While doing that, get used to using the debugger - stepping the code, viewing data & registers, etc.
The next step is to send characters using simple, direct, UART output.
In the case of STM32, use HAL_UART_Transmit().
This will not only prove your software, but also the hardware connections to your terminal (or whatever).
The above is steps 1-3 here:
https://wiki.st.com/stm32mcu/wiki/Category:Getting_started_with_STM32
Then - and only then - you can move on to printf
https://wiki.st.com/stm32mcu/wiki/Getting_started_with_UART
https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Step3_Introduction_to_the_UART
More on STM32 getting started:
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-06 4:18 AM
Thanks alot,
I was able to connect USART2 via FTDI from the PC to the NUCLEO-H743ZI2.
And read/send data.
But what im missing out is how i can send/read data via my St-linkv3 usb connection for debugging.
How do i know what USART i need to configure(such that i can redirect it) ?
I cant find it in the user manual of the NUCLEO-H743ZI2.
Any advice would be great, thanks alot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-06 4:22 AM
@Ariel1 wrote:I was able to connect USART2 via FTDI from the PC to the NUCLEO-H743ZI2. And read/send data.
So that's answered the original question, then?
If so, please mark the solution:
https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256
@Ariel1 wrote:what im missing out is how i can send/read data via my St-linkv3 usb connection for debugging.
That's a new question - please start a new thread for that.
Post a link here so that people can find it...
(but first, check out the Nucleo board's User Manual - it's in there)
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-06 4:35 AM
Hi thanks for your quick response.
It didn't answered my original question because I still cannot debug and output logs.
I found that in the manual:
"By default the USART3 communication between the target STM32H7 and the STLINK-V3E is enabled, to support the Virtual COM port (SB12 and SB19 ON)."
It means I can just use USART3 and it will be used to output to the VCP?
Thanks, Ariel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-06 5:39 AM
