Skip to main content
leonardo
Associate III
February 7, 2020
Question

STM32CubeMX 5.5 does not generate CMSIS DSP files

  • February 7, 2020
  • 13 replies
  • 6533 views

I've created a STM32CubeMX project for stm32f411re uC and try to add CMSIS DSP suppor. I go to "Aditional Software" -> ARM.CMSIS and check CORE 5.3.0 and DSP 1.7.0. Into DSP I chose Source. CubeMX download the CMSIS package into STM32Cube/Repository/Packs/ARM/CMSIS.

Then I generate the project and imported into SystemWorkbech IDE.

I've try to add #include "arm_match.h" and I get file not found error. In the project tree is not references to CMSIS DSP libraries...

13 replies

leonardo
leonardoAuthor
Associate III
February 7, 2020

I found that after checking Additional Software we need to go to "Pinout and Configuration" and under Additional Software we need to check CMSIS CORE and CMSIS DSP.

But the problem now is that the when I try to compile the generated project on SystemWorkbech IDE I get:

Building file: ../Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.c
Invoking: MCU GCC Compiler
/mnt/exchange/ws_Itam_2020/sdsd/Debug
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 -DUSE_HAL_DRIVER -DSTM32F722xx -I"/mnt/exchange/ws_Itam_2020/sdsd/Inc" -I"/mnt/exchange/ws_Itam_2020/sdsd/Drivers/STM32F7xx_HAL_Driver/Inc" -I"/mnt/exchange/ws_Itam_2020/sdsd/Drivers/STM32F7xx_HAL_Driver/Inc/Legacy" -I"/mnt/exchange/ws_Itam_2020/sdsd/Drivers/CMSIS/Device/ST/STM32F7xx/Include" -I"/mnt/exchange/ws_Itam_2020/sdsd/Drivers/CMSIS/Include" -I"/mnt/exchange/ws_Itam_2020/sdsd/Middlewares/Third_Party/ARM_CMSIS/CMSIS/Core/Include" -I"/mnt/exchange/ws_Itam_2020/sdsd/Middlewares/Third_Party/ARM_CMSIS/CMSIS/Core_A/Include" -I"/mnt/exchange/ws_Itam_2020/sdsd/Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include" -Og -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF"Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.d" -MT"Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.o" -o "Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.o" "../Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.c"
../Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.c:29:10: fatal error: arm_bitreversal.c: No such file or directory
 #include "arm_bitreversal.c"
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/subdir.mk:18: fallo en las instrucciones para el objetivo 'Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.o'
 ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.o] Error 1

I saw that now the project include arm_math.h but don't include arm_common_tables.h nor arm_const_structs.h. I think that this are needed...

any clue?

leonardo
leonardoAuthor
Associate III
February 7, 2020

Navigating through CMSIS files I saw that in folder

/STM32Cube/Repository/Packs/ARM/CMSIS/5.6.0/CMSIS/DSP/Source/TransformFunctions

there are a lot of files, arm_bitreversal.c is one of them. If I manually copy those files, then the project stop compiling on the file SupportFunctions.c.

Here, the problem is the same. In the original CMSIS folder there are a lot of files, but they are not copied to the project by CubeMX.

Do I need to manually copy all of this files or am I missing something else?

n2wx
Senior
February 8, 2020

../Drivers/CMSIS/Include is included by default but doesn't seem to be enough. For my H7 part I had to grab the en.stm32cubeh7_v1-6-0.zip which has the drivers, unzip it in a directory adjacent to my project's directory, and add ../../../stm32cubeh7/STM32Cube_FW_H7_V1.6.0/Drivers/CMSIS/Device/ST/STM32h7xx/include (wow that's a long pathname for a relative path) to the Properties/C-C++ Build/Tool Settings/Directories include path list. This is on a ubuntu box, YMMV elsewhere

leonardo
leonardoAuthor
Associate III
February 8, 2020

but adding that folder to the include list is all you need in order to use arm_xxxxx DSP functions?

leonardo
leonardoAuthor
Associate III
February 9, 2020

any answer from ST side? CubeMX code generator have a function that doesn't work or it is not well documented. Can someone explain how to add CMSIS DSP function using CubeMX 5.5.0, please?

HTuam.1
Associate
March 13, 2020

I got the same problem.

Did you solve the issue in the meantime?

JWON.1
Visitor II
March 19, 2020

I got the same problem too....

Kazimierz Król
Associate III
April 27, 2020

Same problem here. I use Cube MX 5.6.1, selected ARM.CMSIS CORE and DSP, but I am getting "fatal error: arm_bitreversal.c: No such file or directory".

I tried selecting DSP ad Library, but then the error is "undefined reference to `arm_fir_init_f32'", so the library is not linked. How do I link the library? Where is it?

ASerr.1
Visitor II
April 28, 2020

Same problem here, a clear answer from technical support would be appreciated..

AlexO
Visitor II
May 4, 2020

I ran into the same issue. In the 'Additional Software' dialog I get a unresolved dependency (CMSIS DSP requires CMSIS CORE, which is included).

Has anyone a workaround? Does it help to simply copy the folder to the project?

noname
Associate
May 16, 2020

I have the same issues. Maybe someone has managed to get a workaround for this?

noname
Associate
May 16, 2020

All right, here is what I have done to resolve the issue.

First of all the files are indeed missing. I've downloaded CMSIS 5.6.0 from github (5.7.0 is currently broken for CubeIDE and CubeMX, see https://github.com/ARM-software/CMSIS_5/issues/900). Open the project folder and navigate to Middlewared/Third_Party/ARM_CMSIS/CMSIS/DSP/Source. Now copy the *.c files from the downloaded library (CMSIS/DSP/Source/**/*.c) into the folder you've just opened. Make sure to copy only files starting from arm_*.c. Each folder under DSP in the project will contain a file with the name [NameOfTheFolder].c generated by CubeMX. For example BasicMathFunction.c. Open all files of that kind an comment out all the includes of *.c files. They are no longer needed since the files are added explicitly, otherwise you'll get multiple definition errors. TransformFunctions folder will contain a file with *.s extension. Either leave the C version of it or the assembler one, otherwise you'll again get the multiple definition error. You will also need to copy over two header files from the downloaded CMSIS library into the include directory under Middlewared/Third_Party/ARM_CMSIS/CMSIS/DSP/Include - arm_common_tables.h and arm_const_structs.h. After that the project should compile without errors.

From the above it seems like additional software feature is broken in CubeMX. So basically I had to do everything manually. Hope this helps.

Explorer
February 4, 2025

This solution helped me. Thank you. I am working with ARM CMSIS version 5.8.0 on STM32U5. The only difference is that I copied the entire Include directory because some structure definitions were missing. Best regards.