cancel
Showing results for 
Search instead for 
Did you mean: 

Printf() does not output anything in STM32F429I_discovery

Linda
Associate II
Posted on May 22, 2014 at 18:31

Hi,

I try to use printf() to debug, but it  does not output anything in STM32F429I_discovery under the Debug (printf) Viewer.

Please help.
3 REPLIES 3
chen
Associate II
Posted on May 22, 2014 at 18:53

Hi

'' I try to use printf() to debug, but it  does not output anything in STM32F429I_discovery under the Debug (printf) Viewer.''

This is an embedded environment, technically there is no such thing as the 'console'. printf has to be directed somewhere.

Some people has a spare UART and use that.

On some debuggers, there is a special port function for directing debug information. See this link

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fSTM32F429%20Debug%20Viewer%20Usage&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https%3A%2F%2F...

chen
Associate II
Posted on May 22, 2014 at 18:55

OK, so you have a nice big LCD screen on the STM32F4 Disco. If you want the printf on that screen, you will have to direct it there.

Posted on May 22, 2014 at 20:10

For Keil's ''Debug (printf) Viewer'' to work a lot of things have to be set up correctly in the Debug/Trace options, the STM32F429I-DISCO needs the SB9 solder bridge to be made.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F429%20Debug%20Viewer%20Usage&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx&currentviews=33]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fSTM32F429%20Debug%20Viewer%20Usage&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https%3A%2F%2Fmy.st.com%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FAllItems.aspx¤tviews=33

http://armcortexm.blogs.upv.es/stm32f4-discovery-and-printf-redirection-to-debug-viewer-in-keil/

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..