cancel
Showing results for 
Search instead for 
Did you mean: 

FPU can not be enabled?

misterstarshine
Associate III
Posted on September 09, 2016 at 01:42

Hi.

I'm using the STM32F746G-Discovery board.

I'm trying to make gcc output code that uses the FPU. The flags generated by my compiler settings when the FPU is supposed to be enabled are

arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16

and corresponding flags for FPU disabled are

arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=soft

The compiler seems to generate the same code as if the FPU is disabled in both cases. This can be seen in the assembler code and the performance is identical for a floating point operation. Is it supposed to be like this?
1 REPLY 1
Posted on September 09, 2016 at 09:02

Note that the FPU in 'F746 is single-precision only, i.e. it's only the ''float'' type which gets processed by the FPU, ''double'' is still processed by software. Note that you need to suffix constants with ''f'' otherwise they are double.

JW