[Error] How to fix ARMCLANG no FPU warning for Cortex-M1

Hardware issues, electronic components, schemas, Arduino, STM32, Robots, Sensors
Post Reply
Administrator
Site Admin
Posts: 81
Joined: 26-Feb-2014, 17:54

[Error] How to fix ARMCLANG no FPU warning for Cortex-M1

Post by Administrator » 10-Jan-2023, 22:56

When you get a warning in Keil uVision compiler:

Code: Select all

#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
you should set compilers' floating point option:
-mfloat-abi=soft

Other possible options:
soft - Software library functions for floating-point operations and software floating-point linkage.
softfp - Hardware floating-point instructions and software floating-point linkage.
hard - Hardware floating-point instructions and hardware floating-point linkage.
Keil_FPU_PRESENT.png
Keil_FPU_PRESENT.png (45.45 KiB) Viewed 8174 times
https://developer.arm.com/documentation ... mfloat-abi
https://gcc.gnu.org/onlinedocs/gcc-4.4. ... tions.html
https://habr.com/ru/company/embox/blog/418295/

Post Reply