2011-03-19 01:36 AM
Printf in Keil
2012-07-28 08:19 PM
Ah, got it!
The instructions listed in that blog link will work. However, as the author mentioned, it doesn't auto-program when entering Debug. I got no printf() output because I was running stale code. The fix is under ''Utilities->Update Target Before Debugging'' (check, obviously).2012-09-28 09:46 AM
Hello!
I was wondering if it's possible to save debug data transferred from the MCU (or at least, from the simulator) to a local file on a PC with KEIL while debugging the MCU. In the IDEs for other microprocessors fprintf() or fwrite() can used for this purpose. So, the data from the microcontroller, instead of being displayed in the Printf Debug window, is saved to a file. Thanks.2012-11-23 03:02 AM
If you use a Stm32f4 Discoveryboard follwo the instructions in that link:
http://armcortexm.blogs.upv.es/stm32f4-discovery-and-printf-redirection-to-debug-viewer-in-keil/
and change the Clockfreq to 53,76000 MHz. this worked for me. I got the Freq from this Document. This helped a lot.http://www.keil.com/appnotes/docs/apnt_asp
The *.pdf link does't work right now , but if you search the web you will find the file. (Discovery evaluation board using ARM® Keil™ MDK Toolkit featuring Serial Wire Viewer Summer 2012 Version 1.1 by Robert Boys, bob.boys@arm.com) ________________ Attachments : stm32F4_cortex-m4.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I12u&d=%2Fa%2F0X0000000bhv%2F50KssleBJySXtxJ5Py55vIiJhXluGhRSQApXYti1ppE&asPdf=false2012-11-23 04:46 AM
I was wondering if it's possible to save debug data transferred from the MCU (or at least, from the simulator) to a local file on a PC with KEIL while debugging the MCU. In the IDEs for other microprocessors fprintf() or fwrite() can used for this purpose.
You might need to check Keil's semihosting library, for what it provides. I'm using Crossworks, and do this the same style as using debug_printf(). There are the accompanying functions like debug_fopen(), debug_fprintf() and debug_fclose(), which deal with files on the host.