Loading...
 
Skip to main content

System Workbench for STM32


Inconsistent hard floating point settings

Hi,

I am developing a project for the STM32F746IGKx MCU using STM32CubeMx and I am having issues with MCU floating point settings.

At the top-level project, I have chosen the hard floating point options with Floating point hardware set to "fpv5-sp-d16" and Floating-point ABI set to "hard". If I look at the tool settings at the top-level project and for the Drivers and Middleware folders, the All options text box in the GCC and all of the other tool settings contains "-mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16", as I would expect. However, if I look at the Application folder and all of my own folders underneath, they are "-mthumb -mfloat-abi=soft". When the IDE attempts to link the project, obviously, I get ".elf uses VFP register arguments, ./Application/User/.o does not.

Why don't the top-level MCU settings force all of the settings to be the same? Why are the files under my Application folder being set to -mfloat-abi=soft? As you'd expect, before writing this forum post, I tried to manually add the "-mcpu=cortex-m7 -mthumb -mfloat-abi=hard" options to the tool settings in the lower-level directories but then I got an error of "arm-none-eabi-g++.exe: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together" The command line options have both the -mfloat-abi=soft and -mfloat-abi=hard options. I am mystified as to why the tool is adding the -mfloat-abi=soft option in the first place.

Any help with this problem will be greatly appreciated. I went a little balder today...

Regards,

Oliver

I'm running some tests using the CMSIS maths library at the mo. Compiles / runs ok, after including arm_math.h and defining ARM_MATH_CM7 in the paths and symbols section. I don't recall setting FPU options...