Skip to main content
BTrem.1
Senior
January 14, 2021
Solved

How to use CMSIS-DSP with STM32G431 in Keil compiler? Getting compiler error

  • January 14, 2021
  • 3 replies
  • 3160 views

I want to use a CMSIS-DSP FIR function in my code and get a compile error:

compiling phase_det.c...
../Drivers/CMSIS/Include/core_cm4.h(81): error: #35: #error directive: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
 #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
..\Src\phase_det.c: 0 warnings, 1 error

In Keil I used the 'Manage Runtime Environment ' to add CMSIS-DSP Library. In my source code file I haven't yet added the FIR, but I did add the include "arm_math.h".

What does the above error mean? The STM32G431 does have an FPU as far as I know (Ref Manual). Anyway, I want to use fixed point FIR.

What steps do I need to take to properly install the CMSIS-DSP Library?

This topic has been closed for replies.
Best answer by Andrew Neil

Did you post this on the Keil forum 2 months ago?

https://community.arm.com/developer/tools-software/tools/f/keil-forum/48498/how-to-use-cmsis-dsp-library-on-stm32g431--getting-compile-error

EDIT

Ah - the OP here is 2 months old, too: @Igor Cesko​  has just woken it up!

3 replies

Igor Cesko
ST Employee
March 25, 2021
Andrew Neil
Super User
March 25, 2021
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Andrew NeilBest answer
Super User
March 25, 2021

Did you post this on the Keil forum 2 months ago?

https://community.arm.com/developer/tools-software/tools/f/keil-forum/48498/how-to-use-cmsis-dsp-library-on-stm32g431--getting-compile-error

EDIT

Ah - the OP here is 2 months old, too: @Igor Cesko​  has just woken it up!

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
BTrem.1
BTrem.1Author
Senior
March 29, 2021

Yes that's me. Problem resolved with order of #includes.

Andrew Neil
Super User
March 29, 2021

Then please update your Keil thread, and mark the solution there.

Also choose 'Best Answer' here:

0693W000008y9fZQAQ.png 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.