# How to configure Coide to use DSP library for STM32f3?

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.

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.

• actually i was using arm GCC then switched to YAGARTO when i had this erro. – ChiPlusPlus Nov 28 '14 at 21:55
• @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? – markt Nov 28 '14 at 22:34

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

#define ARM_MATH_CM4

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