cancel
Showing results for 
Search instead for 
Did you mean: 

Using DSP libraries (e.g. arm_math.h) in STM32CubeIDE, STM32F4

Legacy member
Not applicable

Hi I need some help,

I am having the same problem using CubeIDE v1.0. I have copied the arm_math.h, const_structs.h and arm_common_tables.h into Drivers/CMSIS/DSP/Include.

I was not able to find arm_math.h until I went to Project > Properties > C/C++ General > Paths and Symbols > Includes and added in Drivers/CMSIS/DSP/Include. That fixed the problem of not finding arm_math.h

After which I get a whole bunch of errors:

 __uint32_t

../Drivers/CMSIS/DSP/Include/arm_math.h:6612:3: error: unknown type name 'uint32_t'; did you mean '__uint32_t'?

 uint32_t blockSize);

...

...

../Drivers/CMSIS/DSP/Include/arm_math.h:6873:16: error: unknown type name '__STATIC_INLINE'

 CMSIS_INLINE __STATIC_INLINE q15_t arm_bilinear_interp_q15(

    ^~~~~~~~~~~~~~~

../Drivers/CMSIS/DSP/Include/arm_math.h:6873:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'arm_bilinear_interp_q15'

 CMSIS_INLINE __STATIC_INLINE q15_t arm_bilinear_interp_q15(

          ^~~~~~~~~~~~~~~~~~~~~~~

../Drivers/CMSIS/DSP/Include/arm_math.h:6951:16: error: unknown type name '__STATIC_INLINE'

 CMSIS_INLINE __STATIC_INLINE q7_t arm_bilinear_interp_q7(

    ^~~~~~~~~~~~~~~

Thanks!

34 REPLIES 34
chaaalyy
Senior II

Step 1: Copy CMSIS/Drivers/DSP/ Include and Source folders like you already did

Step 2: Add /DSP/Include - folder to your include path settings

Step 3: under "Symbols" add TWO of them : a) ARM_MATH_CM7 (for M7 CPUs) b) __FPU_PRESENT (each of them without values)

Step 4: have Fun ;)

It seems, you missed step 4b ...

/Charly

DParr.1
Associate

I was getting a lot of errors as well, I tried many things and the most I achieved was to be able to have the #include "arm_math.h" in the file without generating compilation error, but I wasn't able to use any of the library functions.

I found a video and following the "Preparations" section [min 2:29-5:00] solved the issues to me.

This is the video:

https://www.youtube.com/watch?v=vCcALaGNlyw

Hope this helps

Thank You

This answer and video worked for me .

K.G.Boos.1
Associate

@weehong.yeo​ Just want to say a HUGE thank you for this thread. Spent hours struggling till I found your excellent description!

Legacy member
Not applicable

No prob! Glad it is helpful! :)