Hello i want to use dsp in my project in Keil IDE for that i have to include arm_math.h.
In that case i am getting 30 errors
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1183): error: #79: expected a type specifier
__STATIC_FORCEINLINE int32_t __SMMLA(
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1183): error: #101: "int32_t" has already been declared in the current scope
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1183): error: #141-D: unnamed prototyped parameters not allowed when body is present
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1188): error: #20: identifier "sum" is undefined
return (sum + (int32_t) (((int64_t) x * y) >> 32));
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1188): error: #20: identifier "x" is undefined
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1188): error: #20: identifier "y" is undefined
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1801): error: #757: function "int32_t" is not a type name
int32_t shift,
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1816): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1914): error: #757: function "int32_t" is not a type name
int32_t resetStateFlag);
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1932): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1951): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(4585): error: #757: function "int32_t" is not a type name
int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(4598): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(4611): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(4624): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(4659): error: #757: function "int32_t" is not a type name
int32_t * pTapDelay,
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(4695): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(4733): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(4771): error: #757: function "int32_t" is not a type name
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5544): warning: #174-D: expression has no effect
int32_t i; /* Index variable */
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5544): error: #65: expected a ";"
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5548): error: #20: identifier "i" is undefined
i = (int32_t) ((x - S->x1) / xSpacing);
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5601): warning: #174-D: expression has no effect
int32_t index; /* Index to read nearest output values */
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5601): error: #65: expected a ";"
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5606): error: #20: identifier "index" is undefined
index = ((x & (q31_t)0xFFF00000) >> 20);
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5659): warning: #174-D: expression has no effect
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5659): error: #65: expected a ";"
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5664): error: #20: identifier "index" is undefined
index = ((x & (int32_t)0xFFF00000) >> 20);
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5664): error: #31: expression must have integral type
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5664): error: #18: expected a ")"
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5940): error: #757: function "int32_t" is not a type name
int32_t * circBuffer,
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5941): error: #757: function "int32_t" is not a type name
int32_t L,
C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(5943): error: #757: function "int32_t" is not a type name
is there any special thing to do for including arm_math.h
raja sharma said:C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1183): error: #79: expected a type specifier __STATIC_FORCEINLINE int32_t __SMMLA(
Looks like it has not recognised __STATIC_FORCEINLINE
So either arm_math.h requires some other header(s) to define that, or you are missing some configuration(s) that would enable it.
Edit: or, possibly, both!
Have you tried starting with a known-working example?
eg, http://www2.keil.com/mdk5/learn
Andy Neil said:Have you tried starting with a known-working example?
eg, http://www.keil.com/pack/doc/CMSIS/DSP/html/index.html
"The library ships with a number of examples which demonstrate how to use the library functions"
I tried many things but when ever i add arm_math.h header file to use DSP function many errors came out, i am sharing my project to you if u want you can check it and try to resolve it. Please
https://drive.google.com/open?id=1-K3YeN-hOIFPAjF9IQsfGYvLfE21z10D
and __STATIC_FORCEINLINE defined in my arm_math.h header file like this
#define __STATIC_FORCEINLINE static __forceinline
is it ok?
Again, have you tried a known-working example?
Have you studied the documentation & tutorials ?
yes i tried working example and studied the documentation.
actually when i tried make a new project from keil and select dsp and include arm_math.h it working fine without error.
but my last project created by stm32cubemx and in that i added dsp and include arm_math.h, then i found many errors
So compare the cube-generated project with the working ones to see where it's going wrong!
Check the Cube documentation to see if there is any specific guidance on this.
Look for Cube examples which use the CMSIS DSP
Note that stm32cubemx is nothing to do with Keil or ARM - you need to go to ST for support with that.
Change the compiler to version 6. if using STMCubeMX better to place the header files in the main.h
I made the same mistake you did, I updated the <cmsis_armcc.h> and <core_cm7.h> files and successfully compiled it
Hi raja sharma do you have an answer to this question? If so, please accept the answer below. Many thanks.