cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 5.5 does not generate CMSIS DSP files

leonardo
Associate III

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...

16 REPLIES 16
leonardo
Associate III

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
Associate III

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?

../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

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

Probably not but it'll get you close. Adjacent to the Include directory I named is a helpfully named DSP/Include directory that has the goodies you're looking for like arm_math.h . When it's all said and done you'll need to somehow add

../../../stm32cubeh7/STM32Cube_FW_H7_V1.6.0/Drivers/CMSIS/DSP/Include

to your path, manually with #including the relevant headers individually or more cleanly individually with the preproc directory search path configured in the IDE. The latter is harder to port away from Atollic (recommended to port away) but easier to work with.

leonardo
Associate III

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

I got the same problem.

Did you solve the issue in the meantime?

JWON.1
Associate

I got the same problem too....

Kazimierz Król
Associate III

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?