2016-09-08 04:42 PM
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?2016-09-09 12:02 AM
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