AnsweredAssumed Answered

__STATIC_FORCEINLINE any ideas ?

Question asked by Randy Seedle on Aug 5, 2019
Latest reply on Aug 6, 2019 by Mark Butcher

I have been trying to get some code to build which uses __STATIC_FORCEINLINE .It produces error/warnings like:

 

../Source/cmsis_version.h:1723:6: warning: implicit declaration of function '__DSB' [-Wimplicit-function-declaration]
__DSB();

 

../Source/cmsis_gcc.h:882:22: warning: conflicting types for '__DSB'
__STATIC_INLINE void __DSB(void)
^~~~~
../Source/cmsis_gcc.h:882:22: error: static declaration of '__DSB' follows non-static declaration
In file included from ../Source/core_cm4.h:63:0,
from ../Source/MK64F12.h:264,
from ../Source/fsl_clock.h:14,
from ../Source/fsl_common.h:173,
from ../Source/fsl_sysmpu.h:11,
from ../Source/fsl_sysmpu.c:9:
../Source/cmsis_version.h:1723:6: note: previous implicit declaration of '__DSB' was here
__DSB();

 

using  __STATIC_INLINE instead you get:

../Source/cmsis_gcc.h:882:22: error: conflicting types for '__DSB'
__STATIC_INLINE void __DSB(void)

 

../Source/cmsis_version.h:1946:18: note: previous declaration of '__DSB' was here
  __STATIC_INLINE __DSB();                                                          /* Ensure all outstanding memory accesses included

 

__DSB looks like this:

//__STATIC_FORCEINLINE void __DSB(void)
__STATIC_INLINE void __DSB(void)
{
__ASM volatile ("dsb 0xF":::"memory");
}

 

What am I missing here ?

Outcomes