float and STM32

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
my64
Posts: 9
Joined: Sun Mar 06, 2011 12:08 am

float and STM32

Post 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
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: float and STM32

Post 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
Post Reply