This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS outputs "ERROR: Unknown compiler." for TI's compiler

Other Parts Discussed in Thread: Z-STACK

Here is source code of a library (hal_types.h) that is used in ZigBee Mesh stack that is released by TI.

#ifndef HAL_TYPES_H_
#define HAL_TYPES_H_



/* ------------------------------------------------------------------------------------------------
 *                                               Types
 * ------------------------------------------------------------------------------------------------
 */
typedef signed   char      int8;
typedef unsigned char      uint8;

typedef signed   short     int16;
typedef unsigned short     uint16;

typedef signed   long      int32;
typedef unsigned long      uint32;
typedef unsigned long long uint64;
typedef uint32             halDataAlign_t;
#define bool               _Bool


/* ------------------------------------------------------------------------------------------------
 *                                          Compiler Macros
 * ------------------------------------------------------------------------------------------------
 */
/* ----------- IAR Compiler ----------- */
#ifdef __IAR_SYSTEMS_ICC__
#define ASM_NOP    asm("NOP")

/* ----------- KEIL Compiler ---------- */
#elif defined __KEIL__
#define ASM_NOP   __nop()

/* ----------- CCS Compiler ----------- */
#elif __TI_COMPILER_VERSION
#define ASM_NOP    asm(" NOP")

/* ----------- GNU Compiler ----------- */
#elif defined __GNUC__
#define ASM_NOP __asm__ __volatile__ ("nop")

/* ---------- MSVC compiler ---------- */
#elif _MSC_VER
#define ASM_NOP __asm NOP

/* ----------- Unrecognized Compiler ----------- */
#else
#error "ERROR: Unknown compiler."                                   //LINE 63!!!!!!!!!
#endif


/* ------------------------------------------------------------------------------------------------
 *                                        Standard Defines
 * ------------------------------------------------------------------------------------------------
 */
#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif

#ifndef NULL
#define NULL 0
#endif


/* ------------------------------------------------------------------------------------------------
 *                                       Memory Attributes
 * ------------------------------------------------------------------------------------------------
 */

#define  XDATA
#define  CODE



#endif /* HAL_TYPES_H_ */

 

I use CCS v6.0.1.00040 and TI v5.1.6 as the compiler. When I hit the compile button on CCS, I get this error 

"..\hal_types.h", line 63: fatal error #35: #error directive: "ERROR: Unknown compiler." 





I don't get any error when I replace line 63 with " #define ASM_NOP    asm(" NOP") ". Could anyone tell me why the compiler does not recognize the
"#elif __TI_COMPILER_VERSION" line?