RV3_sprintf(str,"%f",x) _ftoa Crashes
Greetings Folks:
For those of you that might have been following the previous itoa conversion topic I decided to post this as a new topic as sprintf seems to work fine for me with 'long' integers
I am now trying to learn how to do float to string conversions with my LM3S811EV and the Keil RV3 C compiler. My test code block is as follows:
if (!g_Urt0TxBzy_ui8) { char l_Str[]="123456789012345678901234567890"; float x=123.456; sprintf(l_Str,"%f",x); strcat(l_Str, "nr");//add end of line Uart0Send(l_Str); }
I find that when I try to execute the above 'sprinf' statement my ev crashes and ends up at the MPU fault ISR vector. Although I have printed out the Cortex M3 Technical Manual I have not yet learned how to determine the exact cause of the crash.
I wonder if anyone else in this forum has been able to get the RV3 sprintf statement to work on an LM3S811?
Thanks in advance for any suggestions!
login or register to reply
|