Disabling FPU

Dear all,

I’m wondering if it is possible to leave the FPU unused.

I have tried to do it by making the following changes and the compilation process ends successfully but
in simulation (hitl) the drone crashes.

Thanks!

On a Pixhawk, I have tried to do it in this way:


  1. In px4fmu-v2/nsh/Make.defs, I changed:
    -mfpu=fpv4-sp-d16
    -mfloat-abi=hard

To:

-mfloat-abi=soft


  1. In px4fmu-v2/nsh/defconfig, I changed:

    CONFIG_ARCH_HAVE_FPU=y
    CONFIG_ARCH_FPU=y

To:

CONFIG_ARCH_HAVE_FPU=n
CONFIG_ARCH_FPU=n


  1. In Toolchain-arm-none-eabi.cmake, for cortex-m4 I changed:

    -mfpu=fpv4-sp-d16
    -mfloat-abi=hard

To:

-mfloat-abi=soft

That sounds like something that should work in general, but is not something we have tried, as it slows the system down.