2019-12-18 07:48 AM
I want to use the DSP functions that are present in CMSIS. I'm using STM32CubeIDE with my target board being the ST32F411RE Discovery. Using CMSIS DSP with Keil uVision is extremely simple, you just select thew pack you want and use it but it's not so simple with STM32CubeIDE. CMSIS is included with the latest firmware pack STM32Cube_FW_F4_V1.24.2 but there doesn't seem to be any option within CubeMX or the IDE to add the DSP libraries (which are present in the firmware pack). The CORE libraries are added by default. I have added the DSP Include and Source folders to my workspace, I have added the include paths to the IDE but when I add
#include "arm_math.h
to main.c
I get an error telling me that
fatal error: arm_math.h: No such file or directory
and it is directed at each DSP source file.
I've spent the last few days trying to get past this. Has anyone used the CMSIS DSP functions in STM32CubeIDE and if so, how have they managed to set up CMSIS DSP to work with the IDE? Are there any further things that I could try with my setup? I'm surpised that the integrated CubeMX code generator doesn't provide the option to include DSP.
Many thanks
2019-12-18 08:27 AM
Set up your "Include Paths" properly so the compiler can find the files it is looking for.
Files are in ../CMSIS/DSP/Include not ../CMSIS/DSP
2019-12-18 09:15 AM
I knew the issue was a simple one, thank you I am now at least compiling without errors. Is there a way I can add DSP to the project automatically (or just an easier way) without having to copy and paste the DSP folders to the workspace from the firmware pack, adding the include paths AND adding the preprocessor define symbols? Again, thanks for the help.
2020-06-07 01:45 PM
I tried a lot of methods and things and I wasn't able to use any of the arm_* functions. I found a video and following the "Preparations" section [min 2:29-5:00] solved the issues to me.
This is the video:
2020-06-09 05:28 AM
Thank you for your comment, you helped me a great deal. Thank you!
2021-02-01 03:20 AM
The above youtube link helped in adding arm_math.h file
2021-04-23 08:30 AM
Hello,
I know it is an old thread, but in case there are other members facing a similar issue please refer to the Configuring DSP libraries on STM32CubeIDE FAQ article.
Chahinez.
2021-05-03 02:58 AM
Hi Chahinez,
Thanks. It helped to get started with the DSP lib. There is also need to add __FPU_PRESENT=1 in the preprocessor symbols, otherwise will stuck with the following error:
"Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
2022-11-08 12:00 PM
This no longer relates in 2020 as CMSIS_5 doesn't included precompiled libs. I also can't find any guidance on how to integrate CMSIS_590 into STECubeIDE, which is surprising.
Has anyone solved this?
2022-11-08 12:54 PM
hello @Robmar (Community Member) ,
I did it following this tuto Configuring DSP libraries on STM32CubeIDE
And as mentioned on step 2. Including the DSP libraries and header files :
"Copy <STM32Cube_Repository>\STM32Cube_FW_F4_V.X.XX.X\Drivers\CMSIS\DSP\Include and paste in in the created folder"
precompiled files you are looking for are there
hope this will help you.