You should also define the CPU type in your c-flags (not all Cortex CPUs
*have* floating point. My flags look like this:

$ make print-ARCH_FLAGS
ARCH_FLAGS=-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
$

And if you are wondering, I've got this in my Makefile.rules file ...

print-%:
    @echo $*=$($*)

Which lets you type 'make print-<target-name>' and it will print out what
that name is defined to be.

--Chuck


On Fri, Jul 10, 2015 at 7:59 PM, Bernard Mentink <bment...@gmail.com> wrote:

> Hi Guys,
>
> I have the following error when trying to link my project after including
> some files using floats.
>
> arm-none-eabi/bin/ld: error: dbg/noddy.elf uses VFP register arguments,
> /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libm.a(lib_a-s_sin.o)
> does not
>
> My projects use the following FP compile flags:
> FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
>
> I am compiling for the STM32F4 target and want to use hardware float.
> It seems the tools won't allow that for some reason ..
>
> Any idea's anyone?
>
> Cheers,
> Bernie
>
> --
>
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> *People born in the 50's have lived *
> *in seven decades.*
> *two centuries,*
> *and two millenniums.*
> *We had the best music, fastest cars, drive-in theaters, soda fountains,
> and happy days.*
> *And we are not even that old yet.*
> *We're just that cool.*
>
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> libopencm3-devel mailing list
> libopencm3-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
libopencm3-devel mailing list
libopencm3-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel

Reply via email to