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

This is the one that works for me. But rather than copy into the current workspace, I just link over to the ~/STM32Cube files.

Thanks for the answer.

JMill.1
Associate III

I have another answer that worked for me. Go to the "Addition Software" link on the .ioc. Then filter for ARM CMSIS

0690X00000ByaxmQAB.png

Install this SW package and you will then see an option in the configuration to turn on DSP functions:

0690X00000Byb0WQAR.png

Enable this and regenerate the code. You will then have a new folder in your project titled "Middleware". Dig down deep and you will find the arm_math.h include:

0690X00000Byb1ZQAR.png

This solved the problem. Also make sure to include the required arm math source files into the main Src folder. You can get these from the DSP Source mentioned in the above diagram.

Cartu38 OpenDev
Lead II

According to me STM32CubeMX has never promoted such DSP lib files. But yes if relying on non under root mode (<=> under root box unchecked) then such files are part of included resources because copy all option is available then.

STM32CubeIDE is not allowing to create project asking for non under root mode but is fully supporting it. Way of working so if required is to create your project from STM32CubeMX standalone then to open it within STM32CubeIDE. Once opened in STM32CubeIDE you can remain in without any issue.