2 years ago.

Linking CMSIS

I've exported a project from the online ide into Qt Creator. It doesn't seem like much of the CMSIS stuff is enabled. I've added some macros to my config file so that arm_math.h will be included by core_cm4.h:

  1. define ARM_MATH_CM4
  2. define GNUC
  3. define VFP_FP

/../main.cpp:57: undefined reference to `arm_copy_f32' collect2: error: ld returned 1 exit status

It seems the implementation is missing and that I need to include (from the CMSIS github) the file libarm_cortexM4l_math.a. Is this right? Is the exporter tool really that far off? arm_math.h suggests arm_cortexM4l_math.lib which "the library installer contains".

I've found a solution: download https://github.com/ARM-software/CMSIS/blob/master/CMSIS/Lib/GCC/libarm_cortexM4l_math.a and link it into the project using LIBRARIES := ../libarm_cortexM4l_math.a inside the makefile.

Edit : The previous works if you manage to force Mbed Studio to use the GCC compiler. Out of the box, (with Armc6 compiler) I was able to add this DSP library: https://os.mbed.com/teams/mbed-official/code/mbed-dsp/ and make it work. (I had to delete Transform Functions to get it to build)

posted by E Flam 17 Jan 2019
Be the first to answer this question.