2020-05-11 07:32 AM
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:
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:
So after all these steps, I had my Middleware include files added to my project:
Even the include directories were automatically added to the project settings as can be seen in the following picture:
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.
2020-05-11 08:55 AM
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
2020-05-11 08:58 AM
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.