When compiling the Tivaware USB library in ccs, you get an error "Unrecognized compiler" emitted by usblib.h if the constant ccs is not defined. Additionally, the library requires the --gcc flag to be present in order to compile. It seems like compiling a TI library on a TI compiler should do better. These trivial changes should be implemented in the next release:
1. Check for a compiler flag that gets set automatically by the compiler like __TI_ARM__ or __TI_COMPILER_VERSION__ instead of one you have to set manually like ccs
2. Check for the __TI_GNU_ATTRIBUTE_SUPPORT__ attribute and emit an error if it isn't present
#if defined(codered) || \ defined(gcc) || \ defined(rvmdk) || \ defined(__ARMCC_VERSION) || \ defined(sourcerygxx) #define PACKED __attribute__ ((packed)) #elif defined(__TI_COMPILER_VERSION__) #ifdef __TI_GNU_ATTRIBUTE_SUPPORT__ #define PACKED __attribute__ ((packed)) #else #error The usblib requires the --gcc compiler flag. Please set the flag on \ the command line or in the ccs ide at Project->Properties->Build-> \ ArmCompiler->Advanced Options->Language Options->Enable Support For \ GCC Extensions #endif #elif defined(ewarm) #define PACKED #else #error Unrecognized COMPILER! #endif