I've been using Code Composer's project properties dialog to set up pre-processsor definitions.
I attempted to add a new pre-processor definition today and use it as I have in the past to set up the interrupts table in startup_ccs.c.
For instance I just added a PART_BOOSTXLSENSHUB definition to my list of flags
project -> Properties -> CCS Build -> ARM Compiler -> Summary of flags set:
...--define=PART_TM4C123GH6PM --define=TARGET_IS_TM4C123_RB1 --define=DEBUG --define=PART_CONSOLE --define=PART_LED --define=PART_COM_INPUT --define=PART_BOOSTXLSENSHUB...
In startup_ccs.c I have a few conditionals
//*****************************************************************************
//
// External declarations for the interrupt handlers used by the application.
//
//*****************************************************************************
// To be added by user
#ifdef PART_COM_INPUT
#warning "PART_COM_INPUT"
extern void comIntHandler(void);
#endif
#ifdef PART_SDCARD
#warning "PART_SDCARD"
extern void sysTickHandler(void);
#endif
#ifdef PART_BOOSTXLSENSHUB
#warning "PART_BOOSTXLSENSHUB"
extern void mpu9150IntGPIO(void);
extern void tmp006IntGPIO(void);
extern void boostxlsenshubIntHandler(void);
#endif
and then later on
#pragma DATA_SECTION(g_pfnVectors, ".intvecs")
void (* const g_pfnVectors[])(void) =
{
(void (*)(void))((uint32_t)&__STACK_TOP),
// The initial stack pointer
...
IntDefaultHandler, // Debug monitor handler
0, // Reserved
IntDefaultHandler, // The PendSV handler
#ifdef PART_SDCARD
sysTickHandler, // The SysTick handler
#else
IntDefaultHandler, // The SysTick handler
#endif
IntDefaultHandler, // GPIO Port A
#ifdef PART_BOOSTXLSENSHUB
mpu9150IntGPIO, // GPIO Port B
#else
IntDefaultHandler, // GPIO Port B
#endif
...
When I build this project I'm expecting to see a #warning for PART_BOOSTXLSENSHUB and PART_COM_INPUT.
What I actually get is
Description Resource Path Location Type #1181-D #warning directive: "PART_COM_INPUT" startup_ccs.c /project_base123g line 59 C/C++ Problem #1181-D #warning directive: "PART_SDCARD" startup_ccs.c /project_base123g line 64 C/C++ Problem
I found this strange. Since PART_SDCARD wasn't currently in my flag list.
I did some digging and found that in .cproject there were two sections with PART_ definitions, one that corresponded with what I had added to the flags list.
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.1.compilerID.DEFINE.572145206" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.1.compilerID.DEFINE" valueType="definedSymbols"> <listOptionValue builtIn="false" value="css="css""/> <listOptionValue builtIn="false" value="PART_TM4C123GH6PM"/> <listOptionValue builtIn="false" value="TARGET_IS_TM4C123_RB1"/> <listOptionValue builtIn="false" value="DEBUG"/> <listOptionValue builtIn="false" value="PART_CONSOLE"/> <listOptionValue builtIn="false" value="PART_LED"/> <listOptionValue builtIn="false" value="PART_COM_INPUT"/> <listOptionValue builtIn="false" value="PART_BOOSTXLSENSHUB"/> </option>
And another section that contained flags that were visible to the startup_ccs.c file
<option id="com.ti.ccstudio.buildDefinitions.TMS470_5.1.compilerID.DEFINE.1353091247" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_5.1.compilerID.DEFINE" valueType="definedSymbols"> <listOptionValue builtIn="false" value="css="css""/> <listOptionValue builtIn="false" value="PART_TM4C123GH6PM"/> <listOptionValue builtIn="false" value="TARGET_IS_TM4C123_RB1"/> <listOptionValue builtIn="false" value="DEBUG"/> <listOptionValue builtIn="false" value="PART_CONSOLE"/> <listOptionValue builtIn="false" value="PART_LED"/> <listOptionValue builtIn="false" value="PART_COM_INPUT"/> <listOptionValue builtIn="false" value="PART_COM_LOCK"/> <listOptionValue builtIn="false" value="PART_SDCARD"/> <listOptionValue builtIn="false" value="FLAG_SDCARD_READ_CMD"/> </option>
I can't seem to find where in the CCS project properties these flags are set. Is this something that has changed between CCS updates? I'm currently running "Version: 6.0.0.00190".