Page 1 of 1

how to point printf to uart in MSP430

Posted: Tue Apr 07, 2009 6:56 am
by s3034585
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

Posted: Tue Apr 07, 2009 7:33 am
by gm
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

Posted: Tue Apr 07, 2009 9:56 pm
by naz
you should enable CLIB for printf function.

Posted: Thu Apr 23, 2009 6:54 am
by s3034585
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.