cancel
Showing results for 
Search instead for 
Did you mean: 

How to get STM32CubeMX to include DSP Header files?

Stephen28
Associate III

I have searched, but I cannot find any information how to get the newer STM32CubeMX 5+ or the STM32CubeIDE to include the DSP header files arm_math.h, arm_const_structs.h, and arm_common_tables.h. They were copied on the older versions. How do I tell CubeMX that I want these files included? They exist in the Repository under Drivers/CMSIS/DSP/Include, but they no longer get added to the project when files are generated.

23 REPLIES 23

Hi @Stephen28​ 

Could you please tell me which MCU and version STM32CubeMX do you use ?

Best regards,

Nesrine

Stephen28
Associate III

Both STM32CubeMX 5.1 and the CubeIDE. It worked in CubeMX version 4 and earlier.

I see this problem for M4 and M7 processors, specifically STM32F405RG and STM32F722RE

Thanks.

Hi @Stephen28​ 

I just redo the same scenario, the files: arm_common_tables.h, arm_const_structs.h and arm_math.h are generated normally. (with both  STM32F405RG and STM32F722RE ).

0690X000008BTXsQAO.png0690X000008BTY2QAO.png

Best regards,

Nesrine

Stephen28
Associate III

Nesrine,

I copied the project and renamed it "Fred".

I deleted all source code from Fred.

Opened Fred.ioc and generated the code.

The three files arm_common_tables.h, arm_const_structs.h, and arm_math.h do not appear in Fred->Drivers->CMSIS->Include

I zipped Fred and attached it to this message.

This project is old, and has been migrated with new versions of CubeMX many times. Since it worked in 4.0 and earlier, I am assuming that this got broken during the migration from version 4 to version 5. Is there are error in Fred.IOC that can be corrected?

Stephen28
Associate III

I created a new STM32F722RE project using the STM32CubeIDE, and arm_math.h does not get copied into Drivers/CMSIS/Include. Driver/CMSIS/DSP/Include does not exist.

Hello @Stephen28​ 

After check, CubeIDE only makes the copy only of the necessary library files.

0690X000008BWAJQA4.png

Best regards,

Nesrine.

And it's with all the MCU not with only STM32F405RG and STM32F722RE.

Best regards,

Nesrine

Stephen28
Associate III

This is the configuration window I see in CubeIDE

"Copy only the necessary library files" is selected. I cannot find any checkbox to tell CubeMX that the project will use the DSP functions. How does it know to copy the DSP files, if it does not know that they will be used? The Device Configuration Tool does not ask if you are intending to use floating point or DSP functions.

Hi @Stephen28​ 

STM32CubeIDE uses the option "Generate Under Root" that always deactivates "Copy all used libraries into the project folder"

0690X000008Bb4LQAS.png0690X000008Bb4VQAS.png

Best regards,

Nesrine