Re: Replacing the C runtime library?
The buffer I provide for sprintf is twice as big as it needs to be. And I initialize it to 0xff so I can see that, after the crash, the entire buffer was not in use. I can even see how far sprintf got before it crashed: it was processing a %02d.
I'm not calling gmtime from a interrupt. I discovered, though, that other time functions use the same buffer as gmtime. Again, that's not what's happening here.