With the latest MSPWare for my MSP432 launchpad I still get errors when I try to compile a simple C++ project (with main.cpp):
#20 identifier "__NOP" is undefined .ccsproject /foo line 1801, external location: C:\ti\ccsv6\ccs_base\arm\include\CMSIS\core_cm4.h C/C++ Problem
Looking into cmsis_ccs.h I find:
//***************************************************************************** // CMSIS-compatible instruction calls //***************************************************************************** #ifndef __cplusplus // No Operation __attribute__( ( always_inline ) ) static inline void __nop(void) { __asm(" nop"); } __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
Is there any particular reason why these functions are not available in C++?
I read some posts with similar problems dated around June 2015, and the replies stated that this might be fixed in the next release of MSPWare...
Will this be fixed? I am feeling uncomfortable telling my students: Well, I don't know why a C++ Hello World does not compile, please put in a dummy #define __NOP; in your code ....
BR, Andreas