Hi , I'm working on FlashFs example for mcb1700 and can run it on my board but i couldn't understand how printf function can send a string to RS232 using UART0 of lpc1768. I read another thread that one asked a similar question on C51 and a person said that printf function calls putchar() and we should modify putchar function to send the string to another UART but the question is this: however i know that i can modify SER_int()in serial.c for changing the UART port to UART3 or so on. How the printf function can communicate with SER_getChar()in serial.c file to send a string to serial port? for example how the following code sends the string to RS232 ic with UART0? printf("\nRead data from file %s\n",fname); i couldn't find the source code in program.
thanks.
For characters in formatted string _sys_write -> sendchar -> SER_putChar
Which you could presumably test at the various levels and confirm if characters emit from the USART
In uv4 I've generally just done this hosting stuff at the sendchar() level
Suggest you break out the debugger, break point and step-by-step the code if you need that level of understanding.
Ok thank you for your reply.