Binary, do you use Hard-Float or Soft-Float?

Many cost-sensitive ARM Cortex-M devices like the M0+ do not have a hardware floating point unit, and some like the M4 only has an optional single-precision floating point unit (FPU). As outlined in “Be aware: Floating Point Operations on ARM Cortex-M4F“, using floating point operations without a hardware unit can be costly.

Looking at the disassembly for sure will tell you if the hardware is handling the float or double operation or not:

Disassembly showing runtime routines

But who wants check the all the disassembly? With the GNU tools there is an easier way: readelf.

Continue reading