We are running an Atmel AVR32 chip on our board, and recently discovered that printf
with format/conversion specifiers doesn't work. A regular printf
does work.
For instance,
printf("hello\n"); // works just fine
printf("number: %d\n", 12); // returns -1, nothing prints.
No format specifiers seem to have any effect, printf just returns -1.
We have tried linking in different versions of the vfprintf
family of functions, e.g. adding -Wl,-u,vfprintf -lprintf_flt -lm
to add floating point format capabilities (documented here), but to no effect.
Note that we are NOT looking for floating point capabilities, we are just trying to get ANY formatting for a regular decimal (int, uint_8, etc.).
Any help greatly appreciated.
Best Answer
Have you tried creating a character buffer, formatting it, and then printing it?
Also, try initializing the variable first, then include it inside the printf.