Forum : ARM
Original Post
Post Information | Post |
---|---|
January 25, 2012 - 4:28pm
|
I want to compile my project with UART0 putchar = NO C:\Program Files (x86)\Raisonance\Ride\Lib\ARM\smallprintf_thumb.a(_SP_puts.o): In function `_SMALL_PRINTF_puts': what is wrong ? And one more question: is |
Hi,
The thing is that printf() knows what to do when you have a console attached. On embedded applications it does not know where to emit the characters to print. So what the small printf does is that is calls a __io_putchar() function which is responsible for the emission of the characters to print. This function can send characters to USART, to USB, to a LCD display, whatever you like... but you must provide it.
Check out the example in "C:\Program Files\Raisonance\Ride\lib\ARM\io_putchar", which shows how to write your own __io_putchar().
Best Regards,