cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug NUCLEO-H563ZI using STM cube IDE

Mathan-Mukesh
Visitor

Hello everyone I am new to the STM boards I had received my board today I had tried the basic LED toggle code and it is working fine but can someone please guide me to see the debug message on the code like I can see the printf statements how can I see those debug messages can someone please help me.

2 REPLIES 2
Andrew Neil
Super User

Welcome to the forum.

Please see  How to write your question to maximize your chances to find a solution for best results.

 


@Mathan-Mukesh wrote:

Hello everyone I am new to the STM boards .


Do you have experience with any other microcontrollers? With programming in general?

 


@Mathan-Mukesh wrote:

 I had tried the basic LED toggle code and it is working fine 


Was that using an example from CubeIDE?

 


@Mathan-Mukesh wrote:

 to see the debug message on the code .


What debug messages?

 


@Mathan-Mukesh wrote:

 I can see the printf statements how can I see those debug messages 


You mean you have put printf statements into your code?

printf is a standard C function which sends output to stdout.

On a "normal" platform like a PC, output to stdout will appear on the user's console - but an embedded system like a Nucleo board doesn't have such a thing.

So you have to decide where your stdout output will appear: you do that by writing suitable code - commonly to a UART.

Before getting involved in the complexities of printf and stdout, I would strongly suggest that you get basic UART output working using HAL_UART_Transmit:

https://community.st.com/t5/stm32-mcus/implementing-uart-receive-and-transmit-functions-on-an-stm32/ta-p/694926 

At the end of that article, it will direct you to the next step - using that to get printf working to a UART.

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Hi @Mathan-Mukesh and welcome to the Community,

With the KB articles mentioned by @Andrew Neil , you can also refer to this AN4989 Application note STM32 microcontroller debug toolbox.

 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen