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

Author: sukApx (Guest)
Posted on:

Rate this post
0 useful
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 !

Author: M.K. B. (mkbit)
Posted on:

Rate this post
0 useful
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).


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig