Skip to main content
PPoob.1
Associate II
January 9, 2021
Solved

Error including the CMSIS include files in the STM32CubeIDE

  • January 9, 2021
  • 3 replies
  • 5496 views

Hi all

I am having difficulties adding the CMSIS include libraries in the cube IDE, when I attempt to build the project I am getting error messages about files that are already included in the "path and symbols" -> "includes directory". For example the "arm_math.h" library.

0693W000006I5HMQA0.jpgbut I have already included the CMSIS DSP include library which has the "arm_math.h" file in the "Path and symbols"-> "includes directory" section.

as seen here :

0693W000006I5HqQAK.jpg 

could anyone help me regarding this issue ?

Thanks

This topic has been closed for replies.
Best answer by PPoob.1

hi knarfB

I have found the solution to the build errors. you were right, i was due to the GNU C include directory not having the includes in them.

This is for all the lost souls who might find this helpful.

First go to add the include libraries in both the GNU C and GNC C++ include libraries just in case.

The second is, the reason I was getting "multiple definition" errors was. In the include folder, there was a function that has another "include "..." " in them. like this 0693W000006I5kJQAS.jpgonce I commented out this includes file, the "multiple definition" error went away

3 replies

KnarfB
Super User
January 9, 2021

You're showing the include paths for C++ but the errors are in .c files ?

PPoob.1
PPoob.1Author
Associate II
January 9, 2021

this is because i renamed my main.c file to main.cpp in and changed my main file that was meant to be in c to c++

KnarfB
Super User
January 9, 2021

But the .c files like arm_softmaxq15.c show the errors.

PPoob.1
PPoob.1Author
Associate II
January 9, 2021

I just added the included in the GNU C include directories as well as the GNU C++, while now I am seemingly no longer getting the "arm_math.h" error, I am now getting error stating " multiple definition of `arm_*'" functions 0693W000006I5UzQAK.jpgcould this be because i have included in both the GNU C and GNU C++ include directories ?

Edit: nope when I removed the include in the GNU C++ leaving only the include in the GNU C, I am getting back the "arm_math.h" no such file error

0693W000006I5WRQA0.jpgthis is the error message on the console window

PPoob.1
PPoob.1AuthorBest answer
Associate II
January 9, 2021

hi knarfB

I have found the solution to the build errors. you were right, i was due to the GNU C include directory not having the includes in them.

This is for all the lost souls who might find this helpful.

First go to add the include libraries in both the GNU C and GNC C++ include libraries just in case.

The second is, the reason I was getting "multiple definition" errors was. In the include folder, there was a function that has another "include "..." " in them. like this 0693W000006I5kJQAS.jpgonce I commented out this includes file, the "multiple definition" error went away