Hi,
Just starting my first steps with the MSP430...
Can I have printf with the MSP430F2013? It seems that link fails becuase of sizes and I don't know if there is a solution for it?
Thx
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
Just starting my first steps with the MSP430...
Can I have printf with the MSP430F2013? It seems that link fails becuase of sizes and I don't know if there is a solution for it?
Thx
printf() does not know which types and features will be used in the format string, so it has to include support for all of them.
If you want or need to use less code, you must implement the formatting yourself (with itoa() and friends).
It would be possible to configure the USI to output a UART-compatible signal: Using the USI as a UART
Alternatively, it would be possible to implement a UART with bit banging (with hardware support): Implementing a UART Function with Timer_A3
In any case, you need something to connect to UART pins to. This could be, e.g., a TTL/UART/USB converter, or a LaunchPad.
In any case, you must use something like the tiny printf() (which does not support all the features of the real printf()), or better format your strings by hand. (For outputting debug strings, even the tiny printf() would be overkill.)
**Attention** This is a public forum