how to point printf to uart in MSP430

Hi Guys,

Can some one pls tell how to point stdin/stdout to uart in MSP430F1232.

I am trying to debug the source code and want to use printf for debugging.

this processor has an uart, IAR has CLIB and DLIB libraries which do mention about printf option, but its not working…

thanks

tama

You need to implement the __read() and __write() functions to reflect the hardware that you are using. The details can be found in the “Standard streams for input and output” section of the “MSP430 C/C++ Compiler Reference Guide” which is located under the Help menu.

gm

you should enable CLIB for printf function.

CLIB for printf function is by default directed to C spy terminal IO.

I wrote my own putchar which in turn directs this to UART.