1
\$\begingroup\$

I am struggling to use the DSP library provided by ST for my STM32f3 discovery board. I am using Coide. I started by including arm_math.h since all the DSP library files refer to it.

I am getting these errors a lot(they are all in the arm_math.h file).

unknown type name 'INLINE' expected '=', ',', ';', 'asm' or '__attribute' before 'clip_q63_to_q31'

I have been searching for almost two days now and I can't find any useful solution. I am using currently yagarto as a compiler.

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

INLINE is an instruction to the compiler to "inline" a function, that is, wherever it sees a function call it copies the code for the function, instead of jumping to a single copy of the code as per a normal function.

This makes the overall code size larger, in exchange for substantially quicker execution of INLINE functions (because there is no call/return overhead).

I've never used the Yagarto compiler, but my guess would be that it either doesn't support INLINE (unlikely) or that it has a different syntax (very likely). Probably a similar story for the other errors that you're seeing.

Try using GCC instead (which does recognise INLINE, and which is probably the compiler that the ST libraries were written for); iirc there's a link to a "current build" that's easy to locate on the CooCox website.

\$\endgroup\$
2
  • \$\begingroup\$ actually i was using arm GCC then switched to YAGARTO when i had this erro. \$\endgroup\$ Nov 28, 2014 at 21:55
  • \$\begingroup\$ @Med.ali strange... does it say anything in the DSP library about which compiler it's written for? Have you tried deleting/commenting the INLINE references? \$\endgroup\$
    – markt
    Nov 28, 2014 at 22:34
1
\$\begingroup\$

Actually i solved that by adding this line in the beggining of ARM_math.h:

#define ARM_MATH_CM4

\$\endgroup\$
1
  • \$\begingroup\$ When I added #define ARM_MATH_CM4 , #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" occurred... \$\endgroup\$
    – user122292
    Aug 31, 2016 at 4:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.