I have spent the last 2 days chasing a mysterious software problem that causes my program to crash.
I have narrowed it down to an apparent problem with sprintf(). I can recreate the problem by starting with the EVK1100 - SERVICES - FreeRtos example project. I then change the vComTxTask (in src/Common/Minimal/comtest.c) to make use of sprintf() as shown in the attached source file.
On my target board this program crashes (ie. halts, no more serial output, LED's stop flashing) after only a few iterations. If I change the call to sprintf() to a simple strcpy() to put some text into buf, then the program does not crash.
Note that the problem is sensitive to the amount of local variables defined. Without the buffer declaration the program still crashes, but it runs for quite a while before crashing.
Has anyone seen this problem before?
Is there a bug in sprintf()?
Any assistance would be greatly appreciated.