cancel
Showing results for 
Search instead for 
Did you mean: 

Logging debug data with KEIL uVision.

vikreinok
Associate
Posted on January 11, 2013 at 20:29

Hi.

How i can get runtime data out of SMT32? The need is to analyze and tune filter outputs and overall process. 

Currently I am using SMT32 discovery board. And my development tools are Keil uVison v4.6 with ST link v2.60.

Is there a way to do some kind of simple logging. To a file perhaps. Some register or variable values. From Keil IDE maybe ... ST LINK? 

The plan is to tune application before deployment. To emulate sensor (with dummy for loops) values and at the same time look at output behavior. 

Thank you in advance!

#loggin-keil-smt32-st-link-stlink
4 REPLIES 4
Posted on January 12, 2013 at 00:56

I usually push telemetry data out of a serial port. If you are logging very large amounts of data you could perhaps attach a MicroSD card, add some driver code, and a file system. You could easily record 32GB of data.

You could try the SWV feature of the debug interface, but I'm not convinced the ST-Link supports it, or that it's particularly efficient.

BTW it's STM32 not SMT32
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vikreinok
Associate
Posted on January 12, 2013 at 13:01

Thank you for your reply.

Thant could be a great, a optimal way to do the logging. This way could be very useful during deployment and tuning of application. But it does require some external hardware and additional software.

I had something like debug.log file that is generated during Keil debugging process in in mind. A very simple way. Someting like SDOUT logging.

Posted on January 12, 2013 at 15:14

There is a technique call semi-hosting

http://www.keil.com/support/man/docs/ARMCCREF/armccref_Bgbjjgij.htm

http://www.keil.com/support/man/docs/armlib/armlib_Cihibfib.htm

There is also retargeting, which redirects STDIO printf, putchar, etc out a serial port.

http://www.keil.com/support/man/docs/gsac/gsac_retargetcortex.htm

I'm not sure if semi-hosting will provide the bandwidth you need, you'll need to evaluate it.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on January 12, 2013 at 16:36

I'm not sure if semi-hosting will provide the bandwidth you need, you'll need to evaluate it.

 

Usually not.

At least for SWD on the discovery board, it's comparable to a 300...600 bps serial link, in other words, painfully slow.

But at least it is better than nothing.

For higher speeds and/or greater data volumes, a separate RS232 link served me well, too.