Forum: ARM programming with GCC/GNU tools gcc embedded cortex soft / hard float

von sukApx (Guest)

Rate this post
not useful
Thanks in advance.

I'm using GCC to compile my Code for STM32F7 ARM Cortex.

Unfortunately my result always includes floating point emulation 

00200664 00000254 T __aeabi_dmul
00200664 00000254 T __muldf3
00200300 00000276 T __adddf3
00200300 00000276 T __aeabi_dadd
002002fc 0000027a T __aeabi_dsub
002002fc 0000027a T __subdf3

Using the Compileflags:

CFLAGS_ARCH += -mlittle-endian -mcpu=cortex-m7 -mthumb
CFLAGS_ARCH += -mfloat-abi=hard -mhard-float -mfpu=fpv5-sp-d16

How can I disable linking these Functions and see where and why they are 
used in my Code to use only hard single Float?

If I just do -nostdlib it removes the full stdlib. I just want to use 
the Hard FPU for performance instead of precise double precision.

Thanks !

von M.K. B. (mkbit)

Rate this post
not useful
If I get you right, you try to tell the compiler to calculate double 
values as float in hardware, right?

This raises the question why you use double in the first place if you 
just want to calculate with float precision? Maybe you should use float 
and be fine.

If you have no influence on the source you can check if you can tell the 
compiler to do double with less precision (I'm not sure if this is 
possible) or you can write your own implementation for the methods and 
make the linker use them (I don't know how).

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.