AnsweredAssumed Answered

STM32CubeMX doesn't ship CMSIS math/DSP libs

Question asked by hermann.uwe on Jun 3, 2014
Latest reply on Jun 3, 2014 by Clive One
Hi, I've been trying to use some of the math/DSP functions from CMSIS, but that doesn't seem to work out of the box since STM32CubeMX doesn't generate/copy the required library files.

It does, however, copy (some version of) the CMSIS #include files, e.g. arm_math.h, arm_cm4.h, and so on. Those files are pretty useless if you want to actually use some of the functions defined there, say arm_cos_f32() or various others. There will be a linker error since the respective library files (e.g. libarm_cortexM4lf_math.a for gcc, or any other variant) is not available in projects generated by STM32CubeMX.

(I'm currently using STM32CubeMX 4.2.0 with STM32CubeF4 1.1.0)

No, I do not think that having to manually download (some unknown version) of the CMSIS ZIP file from arm.com is a good solution for users. Neither is having to copy the lib files from random places in 3rd-party toolchain directories, from random eval-board CD-ROMS or ZIP files, or from random forum threads, and such. It's highly confusing that STM32CubeMX pretends to ship CMSIS already and thus reduce the manual work required by the user (but after lots of head-scratching and frustration the user has to find out that it only ships some random, relatively useless part of CMSIS).

Also, there are various other issues with that approach, e.g. the user may use some *.a or *.lib file of some random other (older, or newer) version of CMSIS than the one that STM32CubeMX ships the #include files for. Which can of course cause quite a bunch of issues if the version of the *.a file doesn't correctly match what the #include files claim etc. etc.

Please add the respective CMSIS *.a and *.lib files (all variants) to STM32CubeMX-generated projects (the _matching_ versions that are correct for the CMSIS version that STM32CubeMX ships, of course). Thanks a lot!

Outcomes