I have a custom project that we took from CW 6.0 to CW 7.1.1 recently. We moved to the C_4i_CF_SZ_MSL.a and C++_4i_CF_SZ_MSL.a libraries because using the non-SZ libraries increased our flash ROM size by nearly 1MB (up from 1.2mb).
But in doing so, it appears that printf and sprintf, when using %2.2d, %*d, etc seems to ignore the width and prescision parameters.
For example sprintf(tmp, "%.2d.%2.2d.%*2d", event, event, event);
Would yield the string tmp looking like 2d.2d.2d
It appears that . and * are not valid now even though the help files seem to indicate they should be.
I trace the code and it goes into printf_tiny_io.c.
Any opinions? Or anyone know why the stock libraries to link in changed so drastically between CW 6.0 and CW 7.1.1?
I tried your printf files, and the compiler complains about trying to overload the std:rintf routines (amoung others). So I gave that up and decided to optimize the libraries myself, which seems to work except then it complains that the set_printf routine the is in tiny IO (and used with console IO) is not available.
Again, finally got it with some linker work, so, that appears to be the easiest solution (using custom functions for specific ones we need) rather than customizing libraries and trying to get everyone to use the right ones.