hello, I am using Keil's uVision 5 v 5.22. Please tell me how to enable FPU. thank you,
hello, I am using Keil's uVision 5 v 5.22. Please tell me how to enable FPU. thank you,
Hi,
There is a FPU example in the SDK. It's located in the folder
<SDK_InstallFolder>\examples\peripheral\fpu_fft
In Keil the Floating Point Hardware option must be set to "Use Single Precision":
Sigurd, Does this "Use single precision" option have a similar option for building with GCC?
Yes, you have the linker flag called LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
, and CFLAG CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
and also might need to add these ARM_MATH_CM4 flags:
CFLAGS += -DARM_MATH_CM4
ASMFLAGS += -DARM_MATH_CM4
Take look at e.g. the makefile for the example, located in the folder SDK_folder\examples\peripheral\fpu_fft\pca10040\blank\armgcc\
Thanks, will check it out.