Skip to main content
JSILV.2
Associate III
December 12, 2022
Question

How do I activate the FPU on F411?

  • December 12, 2022
  • 7 replies
  • 6178 views

I am using the F411 by CUBE IDE.

I enable the CUBE's library of DSP and it was accomplished naive. Even after I inserted <include "arm_math.h"> the BUILD worked perfectly. But, after I copied one arm_FIR_filter_example from GITHUB, the compilation chashed showing that "I am using PFU instruction on a CPU without FPU". But this CPU HAS FPU and it seems enabled as the post: https://community.st.com/s/question/0D53W000013p53cSAA/how-to-use-fpu-in-stm32f407

Please, do someone knows what should I add to this environment in order to build perfectly?

The path & symbols: ARM_MATH_CM4 (from properties)

MCU GCC Assembler:-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16

It seems correctly configured by CUBE itself, but the BUILD does not finish sucsessfully.

Regards.

This topic has been closed for replies.

7 replies

KnarfB
Super User
December 12, 2022

> MCU GCC Assembler

Settings for .c files are under MCU GCC Compiler, not Assembler.

If the issue persists, post all relevant details like relevant code snippets, build logs and error messages.

Try finding a small example reproducting the issue, e.g. calling a single float function like sinf. Note that type double (like in sin) is not avail in hardware for the chip.

hth

KnarfB

JSILV.2
JSILV.2Author
Associate III
December 12, 2022

Dear Sir.

Thanks for your help. I will follow your thoughts trying to quit this issue.

Best regards.

AScha.3
Super User
December 12, 2022

just make right setting for compiler:

0693W00000WKpS9QAL.pngand set optimizer:

0693W00000WKpSsQAL.pngreport.

"If you feel a post has answered your question, please click ""Accept as Solution""."
JSILV.2
JSILV.2Author
Associate III
December 12, 2022

Dear Sir.

I will try this way.

Regards.

AScha.3
Super User
December 13, 2022

did you set this:

0693W00000WKw0CQAT.pngbecause "fpu not present" = you did not set this.

+

the fpu is always "active". the question is: makes your setting the compiler use fpu-code or not ?

"If you feel a post has answered your question, please click ""Accept as Solution""."
JSILV.2
JSILV.2Author
Associate III
December 13, 2022

Thanks for your reply.

I supposed that I had activated the FPU as my enclosed picture (in fact the CUBE did it itself).

I will just test your sent file and see what it will be.

I tested it, your sent code, And it runs perfect. But I did not find my mistake until now.

If you don't mind to dig inside of my broken test program...I enclosed it

Regards, regards...

JSILV.2
JSILV.2Author
Associate III
December 13, 2022
JSILV.2
JSILV.2Author
Associate III
December 14, 2022

That is the enclosed file.

Since my last post it was deleted(?).

Regards.

JSILV.2
JSILV.2Author
Associate III
December 14, 2022

If someone be around with the problem of "FPU not present" error on Building, try this one in the picture.

Regards.