cancel
Showing results for 
Search instead for 
Did you mean: 

STSW-EDUKIT: How can I view the sprintf messages.

JMazu.1
Associate III

Hi Folks,

Managed to get the source compiled and loaded for the inverted pendulum project.  Rather impressive.

In the source code there's sprintf statements to inform the user on what's going on.

My question is: How can I view these messages?

I'm a bit rusty with STF401 code, just forgotten how to do things.

Can someone please help me?

Thanks,
John.

13 REPLIES 13

No - just try it :

in IDE , bottom window : console view

AScha3_0-1704362193388.png

click on -> small dropdown arrow , right -> command shell console

you get :

AScha3_1-1704362335966.png

first time : -> New ....then choose the USB-serial (on your system maybe COM9 or...)

and you are there.... :)

(next time : name field should show your already made connections )

IDE (eclipse) is very powerful - just the problem is: how to find or set , what you want (not only for you, same for me...).

Then looks like this - when connected:

AScha3_2-1704362844917.png

 

If you feel a post has answered your question, please click "Accept as Solution".
JMazu.1
Associate III

Thanks ASsch.3.

The STM32CubeIDE is a most complex piece of software.  The terminal is NOT part of the original download, you need to download is a separate step.

I can now start a terminal session but alas I haven't worked out what the Baud Rate is.  All I get displayed are random characters but at least that's something.

I will keep trying.

--- most times : 115200 --- but just look in the source (UART2 setting, in MX_UART2_init), you said, you have it. I dont.

+

in my ide 1.13.1 , it was there ... afair. But not sure about this. :)

 

 

If you feel a post has answered your question, please click "Accept as Solution".
JMazu.1
Associate III

Hi AScha.3,

Good news, I checked the huart2 structure and found the baud rate was  set 230,400, not quite a standard rate and very fast.

I found a declaration of SAMPLE_BAUD_RATE = 230400.
I changed it 9,600 baud and all works well.

Thanks for your assistance in solving this problem.