I am new to ARM programming as well as IAR Workbench for ARM. Not even sure if this is the correct area of the forum I should be asking this question, if not please advise the correct area.
I recently was given the task of debugging a problem with one of our boards with ARM firmware. The previous programmer has included debugging statements that would be very helpful if implemented. They all use the printf statement for the messages but I don't know what port they are sent to?
How do I find out where the printf is sending the data? In other IDEs I would look for the statement that defines the UART port. I contacted IAR but they were not able to help because I am not the person who the software is registered too. I am not even sure in our organization who originally ordered the software. The original author of the firmware is no longer employed by the company. The software license is on a dongle so figured there would be no problem contacting IAR support..
Hi DavidMy name is Stephen and I work in the Development Solutions Group at Arm.Sorry, I can't help you with "IAR Workbench for ARM", but Arm's own equivalent product is "Arm Development Studio". You can obtain a free 30 day evaluation here.You are right that in embedded system firmware, the output of printf debugging statements is often redirected to a serial port or UART port, though could also be to USB or (using "semihosting") to the Debugger's own screen.These printf debugging statements are often conditionally compiled-in, depending on a flag such as DEBUG, so you might need to recompile the codebase with that flag (e.g. -D DEBUG).I suggest you have a search through the source code to look for references to "serial" or "UART" or customized versions of the C library function fputc (that printf most likely ultimately calls).If you board has a serial port on it, have you tried plugging in a serial cable & monitor (or serial-to-USB convertor) to see if there is any output?Hope this helpsStephen
Your information is helpful. Will do a search and see what I can find. I have identified the DEBUG flag in previous searches, was also successful in compiling after I set the DEBUG flag TRUE.