9 years, 6 months ago.

Exporting to CoIDE and HardFP

Hey guys,

I export a program for the NUCLEO F411RE using the CoIDE export option and I can successfully open the project and compile it in the latest CoIDE. Everything is looking good, except for one thing: I notice that it is compiling with "-mfloat-abi=softfp;" in the options. So I go into Configuration and change the FPU option from FPU soft to FPU hard and then do a complete rebuild. This time the compiler complains when it goes to run ld.exe. The error looks like:

Quote:

error: Nucleo_Program.elf uses VFP register arguments, C:\path\to\Nucleo_Program/mbed/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/somembedfile.o does not

where the somembedfile.o are pre-compiled files that get exported from mbed.

I do know that since version 89 of the mbed SDK that the FPU is enabled by default, but is the exporter tool not using the latest version?

Thanks,

Paul

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F411RET6 microcontroller.

1 Answer

9 years, 6 months ago.

Hi,

my assumption for this is that mbed library is compiled with the following settings:

        if target.core == "Cortex-M4F":
            self.cpu.append("-mfpu=fpv4-sp-d16")
            self.cpu.append("-mfloat-abi=softfp")

Can you replcae mbed lib weith mbed-src,export and compile? Report the result.

Regards,
0xc0170

Accepted Answer

I replaced mbed lib with mbed-src and exported to CoIDE. I loaded the project into CoIDE and opened the Configuration settings. The default configuration is "FPU soft", so I changed this to "FPU hard" before compiling.

Everything compiles successfully. There are a few warnings about unused variables, but that's to be expected from source. And I did notice that it was giving me lots of these warnings at the end:

Quote:

[cc] cc1.exe: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C [enabled by default] [cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]

But these may have to do with me using gcc-arm 4.8 instead of 4.7.

However it does compile, and I can flash and debug directly from CoIDE.

posted by Paul Hey 30 Oct 2014