heinbali01 wrote on Saturday, March 19, 2016:
Please tell more about your port / compiler / platform.
this function (
snprintf()) is executed the program crashes suddenly
Some implementations of
snprintf() use big amounts of stack. And often
snprintf() can not be used from within an ISR.
As for the stack usage, you may try increase the stack and call ‘snprintf()’ again. Also make sure that the parameters are correct.
If not, the following implementation of
- uses a small amount of stack
- recognises a quite complete syntax format
- does not implement floating point formats (%f %g)
I attached the latest 160112 version as a separate file. Just link
printf-stdarg.c in your project to test it. The complete sources can be found at Labs download