Thanks for the explanation, Chester. I also encoutered the problem with the different linkage specification when trying to remove the #ifndef ... But I noticed that the __NOP definition does not produce an error (in contrast to __nop, __wfi and __wfe when being used in C++ mode. My modified cmsis_ccs.c looks like: //***************************************************************************** // CMSIS-compatible instruction calls //***************************************************************************** __attribute__( ( always_inline ) ) static inline void __NOP(void) { __asm(" nop"); } #ifndef __cplusplus // No Operation __attribute__( ( always_inline ) ) static inline void __nop(void) { __asm(" nop"); } // Wait For Interrupt __attribute__( ( always_inline ) ) static inline void __wfi(void) { __asm(" wfi"); } // Wait For Event __attribute__( ( always_inline ) ) static inline void __wfe(void) { __asm(" wfe"); } #endif Could this be a solution to the problem? Update: I have to correct myself. After cleaning the project and a fresh re-compile, I get (of course) errors in the __NOP definition.... So this is no solution.
↧