Thanks for getting back to me Santiago but I have to dispute your logic. I agree the M4 may not support hardware acceleration of double but the software libraries do support double. Thankfully everything works fine if I increase the size of NDIG to 1080, even though it has a big impact on stack space as the buffer is allocated on the stack. It feels like the libraries have been updated but either that #define was missed or a validation has been left out in _cvt to ensure it doesn't overrun the supplied buffer for larger exponents.
Generally I avoid using any floating point numbers if possible but sometimes needs must.
If anyone does need to use printf type functions with double and find it crashes their system then change the #define NDIG in fp_prv.h to 1080 and or change the line 153 in fp_prv.c form:
while (intpart != 0)
to
while ((intpart != 0) && (p1 >= buf))
The second fix alone will stop the crash but will not allow numbers with exponents > 127 or < -127 to print correctly. Hopefully Freescale will provide an official fix to the stack corruption in a future update.
Best regards,
Adrian.