cancel
Showing results for 
Search instead for 
Did you mean: 

How to use DSP libraries (e.g. arm_math.h) in STM32cubeIDE

baby_chicken
Associate III

Hello All,

I wanted to copy two files from the STM32Cube directory to use arm_math.h, but those files are nowhere to be found.

 

STM32Cube\Repository\STM32Cube_FW_F4_Vxxxx\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib
STM32Cube\Repository\STM32Cube_FW_F4_Vxxxx\Drivers\CMSIS\Lib\GCC\libarm_cortexM4lf_math.a 

 

What should we do when these two are not available?

 

best regards.

 

STM32F407vgt6,cubeIDE Version: 1.14.1,CMSIS Version5.9.0

 

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hi @baby_chicken ,

 

Could you please add the ../Drivers/CMSIS_DSP/Include path and the ../Drivers/CMSIS_DSP/PrivateInclude path to "MCU G++ Compiler" "Include paths"

KDJEM1_0-1725012421772.png

KDJEM1_1-1725012492309.png

 

Thank you;

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

16 REPLIES 16

@Andrew Neil ,Thank you for your response.

 

I have done all of the above and still get an error. What should I do?

 

error: arm_math.h: No such file or directory

 

best regards.


@baby_chicken wrote:

error: arm_math.h: No such file or directory


So have you checked if that file does actually exist somewhere - anywhere - in your project?

Clearly, if it doesn't exist then the compiler is correct in saying, "no such file"!

If it does exist, then is it in a place where your project is configured to find it? ie, is it somewhere as defined in your Include Paths?

@Andrew Neil ,Thank you for your response.

 

baby_chicken_0-1724850963904.png

 

I think I am setting Include Paths here, but what's the difference?

 

KDJEM.1
ST Employee

Hello @baby_chicken ,

 

If you want to use 5.8.0 version of CMSIS or higher, I advise you to follow the steps shared in this FAQ: How to integrate CMSIS-DSP libraries on a STM32 project

Please let me know if the issue is solved or not?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

@KDJEM.1  ,Thank you for your response

 

When I try this method, I get an error “error: arm_math.h: No such file or directory”.

 

What should I do?

best regards.

 

KDJEM.1
ST Employee

Hi @baby_chicken ,

 

Are you copy the Include Drivers from STM32Cube_FW_F4_V1.28.0\CMSIS\DSP\Include to your generate project?

 

KDJEM1_2-1724854251907.png

For that please, ensure that steps 3, 4 and 7 shared in the FAQ are followed properly.

KDJEM1_0-1724853603217.png

 

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

@KDJEM.1  ,Thank you for your response.

 

I just checked and copied it to the project generated from STM32Cube_FW_F4_V1.28.0\CMSIS\DSP\Include.

 

best regards.

KDJEM.1
ST Employee

Hi @baby_chicken ,

 

Are your issue is solved or not?

If not could you please share your project?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.