Skip to main content
BTrem.1
Senior
Jan 14, 2021 4:04 PM UTC
Solved

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

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.
Andrew Neil
Andrew NeilBest answer
Super User
Mar 25, 2021 5:48 PM UTC

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.

5 replies

Igor Cesko
ST Employee
Mar 25, 2021 3:46 PM UTC
Andrew Neil
Super User
Mar 25, 2021 5:46 PM UTC
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
Mar 25, 2021 5:48 PM UTC

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
Mar 29, 2021 3:47 AM UTC

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

Andrew Neil
Super User
Mar 29, 2021 9:52 AM UTC

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.