sprintf causes FaultISR to execute
I recently tried to use sprintf in a project for the LM3S811 Eval Kit and found that the sprintf function causes a FaultISR to execute (always in a continuous loop).
My project is the standard hello project with the sprintf sample code from Keil help included at the beginning of main{}. Here is the sample code that I pasted at the beginning of the main{} function:
char buf [100]; int n; int a,b; float pi;
a = 123; b = 456; pi = 3.14159;
n = sprintf (buf, "%fn", 1.1); n += sprintf (buf+n, "%dn", a); n += sprintf (buf+n, "%d %s %g", b, "---", pi);
The hello project works fine without the sprintf sample code and when I paste the code in everything compiles and loads OK. Debugging will show that the first sprintf statement causes the FaultISR to run and that's it, stuck in the FaultISR forever.
What would cause this condition?
login or register to reply
|