Question
Why doesn't "While" work after adding "-u_printf_float"?
I tried to use "sprintf" printing float value.
So I added "-u_printf_float" on the Miscellaneous->Linker flags.
(-specs=nosys.specs -specs=nano.specs -u_printf_float) <- like this
After that, my code doesn't run "while".
Did I use the wrong way?
++ Using stm32L4
++ Tool Chain : Ac6 STM32 MCU GCC
++ Code
while{
sprintf((char*)debugmsgbuf, "gx : %.3f gy : %.3f gz : %.3f ax : %.3f ay : %.3f az : %.3f\r\n",gx, gy, gz, ax, ay, az);
create_debugmsgNull((char*)debugmsgbuf);
}
void create_debugmsgNull(char* msg)
{
uint32_t i, j;
char* ptr;
i = 0;
ptr = msg;
j = debugindexWrite;
while(*ptr != '\0') debugmsg[j][i++] = *ptr++;
debugmsglength[j] = i;
j++;
if(j >= DEBUGMSG_CUELENGTH) j = 0;
debugindexWrite = j;
}