cancel
Showing results for 
Search instead for 
Did you mean: 

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

BTrem.1
Senior II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Chief II

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!

View solution in original post

5 REPLIES 5
Igor Cesko
ST Employee
Andrew Neil
Chief II

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!

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

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

Also choose 'Best Answer' here:

0693W000008y9fZQAQ.png