cancel
Showing results for 
Search instead for 
Did you mean: 

How to add DSP static libraries in STM32CubeIDE.

Álvaro Frutos
Associate II

I'm trying to compile my project including DSP libraries. I have a STM32F446RE Nucleo Board and I'm using STM32CubeIDE 1.3.1

I'm getting an "undefined reference" error when using the FFT functions. The headers are found as the error would have been different if not. So this error is because the static libraries are not found.

I've read different topics (this or this) in this community but none addresses the solution to adding the binary files.

Let me explain what I did.

In the first place, I downloaded the CMSIS packs into the repository with CubeMX.

Then, in my project, in the .ioc file, I selected "Additional Software" and added the CMSIS packs:

0693W000000XDLSQA4.png

I selected to add the DSP pack as "Library".

This stem was not enough so I had to activate both packs in the .ioc file:

0693W000000XDMfQAO.png

So after all these steps, I had my Middleware include files added to my project:

0693W000000XDNdQAO.png

Even the include directories were automatically added to the project settings as can be seen in the following picture:

0693W000000XDNxQAO.png

However, the libraries (.lib) are not added to the project.

I've tried adding the ARM_MATH_CM4 symbol to the project settings but it didn't help. I've also tried to add the pack as "Source" but it didn't compile.

2 REPLIES 2

For these types of recurrent issues it seems that CubeIDE/CubeMX are poorly tested against real-world use cases, where there are interdependencies in selections and the tool fails to address them properly/completely.

\STM32Cube_FW_F4_V1.25.0\Drivers\CMSIS\Lib\GCC\libarm_cortexM4lf_math.a

Perhaps the addition is perceived as a "linker" task rather than a "compiler" one? The compiler gets closure from the include files.

In other tools the static library (.A or .LIB) can be added in the same way as .S or .C files

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I fixed it adding the library link manually but it seems like something that the IDE should do automatically. Specially considering that it copies the headers and adds the include paths by itself.