cancel
Showing results for 
Search instead for 
Did you mean: 

Failing including CMSIS into a F334 project

White_Fox
Associate III

Hi guys

I try to iclude the CMSIS files into a project with a STM32F334. I followed this article (https://community.st.com/t5/stm32-mcus/how-to-integrate-cmsis-dsp-libraries-on-a-stm32-project/ta-p/666790 ) but failed.

The first difference is, that I do not have a folder "PrivateInclude" to copy from, so I just continued with the other two folders I found, "Include" and "Source".

After adding the two paths in project settings - without adding any code for sure - I get some thousands of compiler errors. The first error messages are "unknown type name 'uint16_t' ". As we know, uint16_t is a type in standard integer library, I already included it successfully.

So I assume there still something missing...but what? And how to get?

Just to be sure, I want to use the controller functions, but I would like to have a general manual to solve such problems in the future (and maybe many other too).

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @White_Fox,

 

Thank you for updating post and coming back to the community.

Please make sure that you library are well integrated.

  • From Project menu or File menugo to Properties > C/C++ Build > Settings > Tool Settings > MCU CGC Linker > Libraries > Libraries (-l) > Add and insert the following library: "arm_cortexM4lf_math".
  • Make sure that you are using the “/” and not the “\” in the paths.

  • Do not use “:libarmcortexM4lf_math.a”. This usage is not recommended as it can lead to side-effects in some use cases.

To check the issue, Could you please share your project?

 

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
KDJEM.1
ST Employee

Hello @White_Fox and welcome to the Community :),

 

Which CMSIS version are you using?

-->The first difference is, that I do not have a folder "PrivateInclude"

Note that, the CMSIS version integrated in STM32CubeF3 1.11.5 is "5.4.0".

KDJEM1_0-1725868381411.png

As mentioned in this FAQ

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you KDJEM.1, this works definitly much better.

Indded, I'm using the latest firmware version 1.11.5 with CMSIS version 5.4.0.

But after following the article, I still have one (hopefully last) problem. I just included the arm_math.h file, make comes up with an error. The error message is this:


make: *** [makefile:64: SPV.elf] Error 2 SPV C/C++

 

Do you have any advise how to solve that?

KDJEM.1
ST Employee

Hello @White_Fox,

 

Thank you for updating post and coming back to the community.

Please make sure that you library are well integrated.

  • From Project menu or File menugo to Properties > C/C++ Build > Settings > Tool Settings > MCU CGC Linker > Libraries > Libraries (-l) > Add and insert the following library: "arm_cortexM4lf_math".
  • Make sure that you are using the “/” and not the “\” in the paths.

  • Do not use “:libarmcortexM4lf_math.a”. This usage is not recommended as it can lead to side-effects in some use cases.

To check the issue, Could you please share your project?

 

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you for your gentle help. It seems to work now.

 

Indeed, there were some multiple errors remaingin...including wrong path separators - windows user has to be very carefully by using the simple copy-path-function - and library name.

 

Now, I do not have any errors anymore, even though I inlclude the arm_math.h file. Great. :)