Loading...
 

System Workbench for STM32


Problem with floating point

Hi,
I’m using openSTM32 on ubuntu with the standard library. with the 1.13 ac6 version. I am writing code for STM32f407 discovery board, I enable the floating point unit but every operation that involves float numbers send the code to the default handler. I’m trying now with the following very simple code:

int main(void)
{

float x;
int u;

u = 1;
x = (float)u;

for(;;);
}

If I use double instead of float it works...do you have any suggestion to solve this problem?

Matteo