Page 1 of 1

float and STM32

Posted: Thu Apr 21, 2011 9:19 am
by my64
Hi,
Each time I use "float" variables in my code, the program hangs.
Does Chibios needs to set some library or tune something to use float maths ?
Olivier

Re: float and STM32

Posted: Thu Apr 21, 2011 9:39 am
by Giovanni
Hi,

The STM32 does not have an FPU so you have to make sure that the compiler uses soft floating point libraries. Probably you just have to specify some extra option for GCC into the Makefile.

This is not related to the OS, you would get the same result also using a naked main().

Giovanni