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.

Linker Error

Other Parts Discussed in Thread: TMS320F28027, CONTROLSUITE

Hey Guys,

It seems that I am having linker issues.

I have this verified code as seen below: 

//
//
//CODE
//
//

#include "DSP28x_Project.h"     // Device Headerfile and Examples Include File

#include "f2802x_common/include/clk.h"
#include "f2802x_common/include/flash.h"
#include "f2802x_common/include/gpio.h"
#include "f2802x_common/include/pie.h"
#include "f2802x_common/include/pll.h"
#include "f2802x_common/include/pwr.h"
#include "f2802x_common/include/wdog.h"
#include "f2802x_common/include/adc.h"
#include "f2802x_common/include/sci.h"
#include "f2802x_common/include/i2c.h"

	CPU_Handle myCpu;
	PLL_Handle myPll;
	WDOG_Handle myWDog;
	ADC_Handle   myAdc;
	CLK_Handle myClk;
	FLASH_Handle myFlash;
	GPIO_Handle myGpio;
	PIE_Handle myPie;
	PWM_Handle 	myPwm1;
	SCI_Handle mySci;

// Prototype statements for functions found within this file.
interrupt void xint1_isr(void);
interrupt void adc_isr(void);
interrupt void adc_isr_pressure(void);
void Init();
void ADC_INIT_Fn();
void ADC_SETUP_Fn();
void pwm_Init_();
void Motor_stop();
void Motor_forward();
void Motor_reverse();
void set_duty( int a);

//------------------I2C Prototypes START-------------------//
void   I2CA_Init(void);
Uint16 Values[6];
Uint16 instr=0x02;
int i;
int data[4] = {1,2,3,4};
int I2C_NUMBYTES = 4;
//-------------------I2C Prototypes END-------------------//


//-------------------UART/SCI Prototypes START-------------------//
interrupt void sciaRxIsr(void);
void scia_init();
void scia_xmit(int a);
void scia_intpt_en();
void send_msg();
void send_back(char data);
unsigned char msg[]="send any data now- Controller will send back it";
unsigned char msg2[]="You Sent:";
unsigned char rx_data;
//-------------------UART/SCI Prototypes END-------------------//


// Global variables for this example
volatile uint32_t Xint1Count;
int32_t adc_button_max= 800;
int32_t adc_button_min = 4095;
int32_t adc_slide_min = 20;
int32_t adc_slide_max = 4085;

//Numbers for Testing Rig///
//int32_t adc_slide_min = 2915;
//int32_t adc_slide_max = 3045;
////////////////////////////
int32_t constant = 0;
int32_t adc_slide_pot = 0;
int32_t adc_button = 0;
int32_t slope = 0;
int32_t delta = 25;
int32_t expected_value = 0;
int32_t top_new = 0;
//PWM
int32_t CMPA=0;
int32_t TBPRD = 4096;

#define DELAY 				100000  // us
#define MOTOR_SWITCH_DELAY 	10 		// us

enum State {STOP = 0, FORWARD, REVERSE};

uint8_t Previous_state = STOP, Current_state = STOP;

int main(void)
{
	// Initialize all GPIOs and variables
    Init();

    //Init I2c
    InitSysCtrl();            // Step 1. Initialize System Control: Need this for UART AND I2c to function properly
    //InitI2CGpio();          //Shouldnt need this anymore due to intialization in Init()
    I2CA_Init();              // Step 4. Initialize all the Device Peripherals

    //initialize adc
    ADC_INIT_Fn();
    ADC_SETUP_Fn();

    // Set up chip to good state
    Motor_stop();

    //UART INIT
    scia_intpt_en();
    scia_init();
    send_msg();


    //Perform necessary calculations to linearize motor states
    //number multiplied by 1000 to allow for integer calculations
    //int32_t top = (adc_slide_max-adc_slide_min);
    int32_t bottom = (adc_button_max - adc_button_min);
    top_new = ((adc_slide_max-adc_slide_min)<<10);

    slope = top_new/bottom;

    //slope = (((adc_slide_min-adc_slide_max)<<10)/(adc_button_max - adc_button_min));
    constant = adc_slide_max - ((slope * adc_button_max)>>10);

    set_duty(2096);

    for(;;)
    {
    	//----------------------------------I2C Start-------------------------------------//
    	// I2C Application loop
    	int i=0;
    	for( i =0 ;i < 2; i++ )
    	{

    		   	  I2caRegs.I2CSAR = 0x38; //Set slave address
    		      I2caRegs.I2CCNT = I2C_NUMBYTES; //Numbe rof bytes to transfer
    		      I2caRegs.I2CFFTX.all = 0x6000; //enable FIFO mode and reset TX FIFO
    		      I2caRegs.I2CDXR = data[0]; //Send data[0-3]
    		      I2caRegs.I2CDXR = data[1]; //Store in next FIFO level
    		      I2caRegs.I2CDXR = data[2]; //Store in next FIFO level
    		      I2caRegs.I2CDXR = data[3]; //Store in next FIFO level
    		      I2caRegs.I2CMDR.bit.TRX = 1; //Set to Transmit mode
    		      I2caRegs.I2CMDR.bit.MST = 1; //Set to Master mode
    		      I2caRegs.I2CMDR.bit.FREE = 1;//Run in FREE mode
    		      I2caRegs.I2CMDR.bit.STP = 1; // release the bus after Tx
    		      I2caRegs.I2CMDR.bit.STT = 1; //Send the start bit, transmission will follow


    	           while(I2caRegs.I2CSTR.bit.XRDY == 1){};     // --> got stuck here after first run <--
    	           I2caRegs.I2CCNT = 6;                             //read 6 bytes from sensor
    	           I2caRegs.I2CMDR.bit.TRX = 0;              //Set to Recieve mode
    	           I2caRegs.I2CMDR.bit.MST = 1;              //Set to Master mode
    	           I2caRegs.I2CMDR.bit.FREE = 1;            //Run in FREE mode
    	           I2caRegs.I2CMDR.bit.STP = 1;              //Stop when internal counter becomes 0
    	           I2caRegs.I2CMDR.bit.STT = 1;              //Repeated start, Reception will follow
    	           for(i = 0; i < 6; i++)
    	               {
    	                   while(I2caRegs.I2CSTR.bit.RRDY == 1){};     //I2CDRR not ready to read?
    	                   Values[i] = I2caRegs.I2CDRR;
    	               }
    	       }   // end of for(;;)

//----------------------------------------------I2C  END-----------------------------------------------------------//



//---------------------------------------ADC/CACULATION START---------------------------------//
    	Previous_state = Current_state;

    	// This is where you collect data
    	// Wait for ADC interrupt, must go before state change  interrupt
    	ADC_forceConversion(myAdc, ADC_SocNumber_0);
    	ADC_forceConversion(myAdc,ADC_SocNumber_1);
    	adc_slide_pot = ADC_readResult(myAdc, ADC_SocNumber_0);
    	adc_button = ADC_readResult(myAdc, ADC_SocNumber_1 );

    	expected_value = ((slope * adc_button)>>10) + constant;

    	if(abs(expected_value - adc_slide_pot) < delta)
    	{
    		Current_state = STOP;
    		Motor_stop();
    		DELAY_US(DELAY);
    		continue;
    	}

// This is where you determine the next state
// This is also where you adjust the Duty cycle based on the PID results

    	if (adc_slide_pot < adc_slide_max && adc_slide_pot > adc_slide_min)
    	{
			if (adc_slide_pot < expected_value )
			{
				Current_state = FORWARD;
			}
			else if(adc_slide_pot > expected_value)
			{
				Current_state = REVERSE;
			}
			else
			{
				Current_state = STOP;
			}
    	}
    	else
    	{
    		Current_state = STOP;
    	}
//---------------------------------------ADC/CACULATION END---------------------------------//


// This is where you act on said state change
    	// Here you process said state change
    	switch(Current_state)
    	{
    	case STOP:
    		if(Previous_state != STOP)
    			Motor_stop();

    		break;
    	case FORWARD:
    		if(Previous_state != FORWARD)
    			Motor_forward();

    		break;
    	case REVERSE:
    		if(Previous_state != REVERSE)
    			Motor_reverse();

    		break;
    	default:
    		Current_state = STOP;

    		if(Previous_state != STOP)
    			Motor_stop();
    	}

    }
}


interrupt void xint1_isr(void)
{
	// This needs to set pin low
    GPIO_setLow(myGpio, GPIO_Number_12);

//    expected_value += 500;
//
//    if(expected_value > adc_slide_max)
//    	expected_value = adc_slide_min;

    // Acknowledge this interrupt to get more from group 1
    PIE_clearInt(myPie, PIE_GroupNumber_1);

}


interrupt void adc_isr(void)
{
    //discard ADCRESULT0 as part of the workaround to the 1st sample errata for rev0
    ADC_clearIntFlag(myAdc, ADC_IntNumber_1);   // Clear ADCINT1 flag reinitialize for next SOC
    PIE_clearInt(myPie, PIE_GroupNumber_10);// Acknowledge interrupt to PIE
    return;
}
interrupt void adc_isr_pressure(void)
{

    //discard ADCRESULT7 as part of the workaround to the 1st sample errata for rev0
	ADC_clearIntFlag(myAdc, ADC_IntNumber_2);   // Clear ADCINT1 flag reinitialize for next SOC
    PIE_clearInt(myPie, PIE_GroupNumber_10);// Acknowledge interrupt to PIE
    return;
}
//---------------------------------------MOTOR STOP START-------------------------------------------//

void Motor_stop()
{
	GPIO_setMode(myGpio, GPIO_Number_0, GPIO_0_Mode_GeneralPurpose);
	GPIO_setDirection(myGpio, GPIO_Number_0, GPIO_Direction_Input);
	GPIO_setMode(myGpio, GPIO_Number_1, GPIO_1_Mode_GeneralPurpose);
	GPIO_setDirection(myGpio, GPIO_Number_1, GPIO_Direction_Input);
	GPIO_setMode(myGpio, GPIO_Number_2, GPIO_0_Mode_GeneralPurpose);
	GPIO_setDirection(myGpio, GPIO_Number_2, GPIO_Direction_Input);
	GPIO_setMode(myGpio, GPIO_Number_3, GPIO_1_Mode_GeneralPurpose);
	GPIO_setDirection(myGpio, GPIO_Number_3, GPIO_Direction_Input);


}
//---------------------------------------MOTOR STOP END-------------------------------------------//

//---------------------------------------MOTOR FOWARD START-------------------------------------------//

void Motor_forward()
{
	Motor_stop();

	DELAY_US(MOTOR_SWITCH_DELAY);

	//sets top connected GPIO0 to PWM function
	GPIO_setMode(myGpio, GPIO_Number_0, GPIO_0_Mode_EPWM1A);
	GPIO_setDirection(myGpio, GPIO_Number_0, GPIO_Direction_Output);

	//set bottom connected Gpio2 to on position
//	GPIO_setMode(myGpio, GPIO_Number_2, GPIO_2_Mode_GeneralPurpose);
//	GPIO_setDirection(myGpio,GPIO_Number_2, GPIO_Direction_Output);
//	GPIO_setHigh(myGpio, GPIO_Number_2);
}
//---------------------------------------MOTOR FOWARD END-------------------------------------------//

//---------------------------------------MOTOR REVERSE START-------------------------------------------//

void Motor_reverse()
{
	Motor_stop();

	DELAY_US(MOTOR_SWITCH_DELAY);
	//sets top connected GPIO1 to PWM function
	GPIO_setMode(myGpio, GPIO_Number_1, GPIO_1_Mode_EPWM1B);
	GPIO_setDirection(myGpio, GPIO_Number_1, GPIO_Direction_Output);

	//set bottom connected Gpio2 to on position
//	GPIO_setMode(myGpio, GPIO_Number_3, GPIO_2_Mode_GeneralPurpose);
//	GPIO_setDirection(myGpio,GPIO_Number_3, GPIO_Direction_Output);
//	GPIO_setHigh(myGpio, GPIO_Number_3);
}
//---------------------------------------MOTOR REVERSE END-------------------------------------------//


void Init()
{

	// Initialize all the handles needed for this application
	myClk = CLK_init((void *)CLK_BASE_ADDR, sizeof(CLK_Obj));
	myCpu = CPU_init((void *)NULL, sizeof(CPU_Obj));
	myFlash = FLASH_init((void *)FLASH_BASE_ADDR, sizeof(FLASH_Obj));
	myGpio = GPIO_init((void *)GPIO_BASE_ADDR, sizeof(GPIO_Obj));
	myPie = PIE_init((void *)PIE_BASE_ADDR, sizeof(PIE_Obj));
	myPll = PLL_init((void *)PLL_BASE_ADDR, sizeof(PLL_Obj));
	myWDog = WDOG_init((void *)WDOG_BASE_ADDR, sizeof(WDOG_Obj));
	myAdc = ADC_init((void *)ADC_BASE_ADDR, sizeof(ADC_Obj));
	myPwm1 = PWM_init((void *)PWM_ePWM1_BASE_ADDR, sizeof(PWM_Obj));
    mySci = SCI_init((void *)SCIA_BASE_ADDR, sizeof(SCI_Obj));

	// Perform basic system initialization
	WDOG_disable(myWDog);
	CLK_enableAdcClock(myClk);
	(*Device_cal)();

	//Select the internal oscillator 1 as the clock source
	CLK_setOscSrc(myClk, CLK_OscSrc_Internal);

	// Setup the PLL for x10 /2 which will yield 50Mhz = 10Mhz * 10 / 2
	PLL_setup(myPll, PLL_Multiplier_10, PLL_DivideSelect_ClkIn_by_2);
	//from UART
	//PLL_setup(myPll, PLL_Multiplier_12, PLL_DivideSelect_ClkIn_by_2);

	// Disable the PIE and all interrupts
	PIE_disable(myPie);
	PIE_disableAllInts(myPie);
	CPU_disableGlobalInts(myCpu);
	CPU_clearIntFlags(myCpu);

//	// If running from flash copy RAM only functions to RAM
//	#ifdef _FLASH
//	    memcpy(&secureRamFuncs_RunStart, &secureRamFuncs_LoadStart, (Uint32) &secureRamFuncs_LoadSize);
//	#endif

	#ifdef _FLASH
    // Copy time critical code and Flash setup code to RAM
    // This includes the following ISR functions: EPwm1_timer_isr(), EPwm2_timer_isr()
    // and FLASH_setup();
    // The  RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart
    // symbols are created by the linker. Refer to the F2280270.cmd file.
	   memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    // Call Flash Initialization to setup flash waitstates
    // This function must reside in RAM
	    FLASH_setup(myFlash);
	#endif // end #ifdef _FLASH


	// Setup a debug vector table and enable the PIE
	PIE_setDebugIntVectorTable(myPie);
	PIE_enable(myPie);

	// Register interrupt handlers in the PIE vector table
	PIE_registerPieIntHandler(myPie, PIE_GroupNumber_1, PIE_SubGroupNumber_4, (intVec_t)&xint1_isr);

	// Enable XINT1 and XINT2 in the PIE: Group 1 interrupt 4 & 5
	// Enable INT1 which is connected to WAKEINT
	PIE_enableInt(myPie, PIE_GroupNumber_1, PIE_InterruptSource_XINT_1);
	CPU_enableInt(myCpu, CPU_IntNumber_1);

	// Enable Global Interrupts
	CPU_enableGlobalInts(myCpu);

	//GPIO_setMode(myGpio, GPIO_Number_2, GPIO_2_Mode_GeneralPurpose);
	//GPIO_setDirection(myGpio, GPIO_Number_2, GPIO_Direction_Output);

	//GPIO_setMode(myGpio, GPIO_Number_3, GPIO_3_Mode_GeneralPurpose);
	//GPIO_setDirection(myGpio, GPIO_Number_3, GPIO_Direction_Output);

	//Setup GPIO 0&1 for PWM output
	GPIO_setMode(myGpio, GPIO_Number_0, GPIO_0_Mode_EPWM1A);
	GPIO_setMode(myGpio, GPIO_Number_1, GPIO_1_Mode_EPWM1B);

	//Initialize PWM
	CLK_disableTbClockSync(myClk);
	pwm_Init_();
	CLK_enableTbClockSync(myClk);

	//INITIALIZE UART GPIO
	// Initalize GPIO
	GPIO_setPullUp(myGpio, GPIO_Number_19, GPIO_PullUp_Enable);
	GPIO_setPullUp(myGpio, GPIO_Number_12, GPIO_PullUp_Disable);
	GPIO_setQualification(myGpio, GPIO_Number_19, GPIO_Qual_ASync);
	GPIO_setMode(myGpio, GPIO_Number_19, GPIO_19_Mode_SCIRXDA);
	GPIO_setMode(myGpio, GPIO_Number_12, GPIO_12_Mode_SCITXDA);

	//follow example from UART for I2c Initialization
	GPIO_setPullUp(myGpio, GPIO_Number_28, GPIO_PullUp_Enable);
	GPIO_setPullUp(myGpio, GPIO_Number_29, GPIO_PullUp_Enable);
	GPIO_setMode(myGpio, GPIO_Number_28, GPIO_28_Mode_SDDA);
	GPIO_setMode(myGpio, GPIO_Number_29, GPIO_29_Mode_SCLA);



	// GPIO12 is XINT1,
	GPIO_setExtInt(myGpio, GPIO_Number_12, CPU_ExtIntNumber_1);

	// Configure XINT1
	PIE_setExtIntPolarity(myPie, CPU_ExtIntNumber_1, PIE_ExtIntPolarity_FallingEdge);


	// Enable XINT1
	PIE_enableExtInt(myPie, CPU_ExtIntNumber_1);

}

//----------------------------------ADC Functions START-------------------------------------//


void ADC_INIT_Fn()
{
  ADC_enableBandGap(myAdc);
  ADC_enableRefBuffers(myAdc);
  ADC_powerUp(myAdc);
  ADC_enable(myAdc);
  ADC_setVoltRefSrc(myAdc, ADC_VoltageRefSrc_Int);

}

void ADC_SETUP_Fn()
{
//set up adc for slide pot
  PIE_registerPieIntHandler(myPie, PIE_GroupNumber_10, PIE_SubGroupNumber_1, (intVec_t)&adc_isr);
  PIE_enableAdcInt(myPie, ADC_IntNumber_3);  // Enable ADCINT1 in PIE
  //Note: Channel ADCINA1  will be double sampled to workaround the ADC 1st sample issue for rev0 silicon errata
  ADC_setIntPulseGenMode(myAdc, ADC_IntPulseGenMode_Prior);               //ADCINT1 trips after AdcResults latch
  ADC_enableInt(myAdc, ADC_IntNumber_3);                                  //Enabled ADCINT1
  ADC_setIntMode(myAdc, ADC_IntNumber_3, ADC_IntMode_ClearFlag);          //Disable ADCINT1 Continuous mode
  ADC_setIntSrc(myAdc, ADC_IntNumber_3, ADC_IntSrc_EOC0);                 //setup EOC0 to trigger ADCINT1 to fire
  ADC_setSocChanNumber (myAdc, ADC_SocNumber_0, ADC_SocChanNumber_A3);    //set SOC0 channel select to ADCINA4
  ADC_setSocTrigSrc(myAdc, ADC_SocNumber_0, ADC_SocTrigSrc_EPWM1_ADCSOCA);      //set SOC0 start trigger on EPWM1A, due to round-robin SOC0 converts first then SOC1
  ADC_setSocSampleWindow(myAdc, ADC_SocNumber_0, ADC_SocSampleWindow_7_cycles);   //set SOC0 S/H Window to 7 ADC Clock Cycles, (6 ACQPS plus 1)
  //set up adc for presssure pot
  PIE_registerPieIntHandler(myPie, PIE_GroupNumber_10, PIE_SubGroupNumber_1, (intVec_t)&adc_isr_pressure);
  PIE_enableAdcInt(myPie, ADC_IntNumber_7);  // Enable ADCINT7 in PIE
  //Note: Channel ADCINA1  will be double sampled to workaround the ADC 1st sample issue for rev0 silicon errata
  ADC_setIntPulseGenMode(myAdc, ADC_IntPulseGenMode_Prior);               //ADCINT1 trips after AdcResults latch
  ADC_enableInt(myAdc, ADC_IntNumber_7);                                  //Enabled ADCINT1
  ADC_setIntMode(myAdc, ADC_IntNumber_7, ADC_IntMode_ClearFlag);          //Disable ADCINT1 Continuous mode
  ADC_setIntSrc(myAdc, ADC_IntNumber_7, ADC_IntSrc_EOC1);                 //setup EOC7 to trigger ADCINT7 to fire
  ADC_setSocChanNumber (myAdc, ADC_SocNumber_1, ADC_SocChanNumber_A7);    //set SOC07 channel select to ADCINA3
  ADC_setSocTrigSrc(myAdc, ADC_SocNumber_1, ADC_SocTrigSrc_EPWM1_ADCSOCA);      //set SOC2 start trigger on EPWM1A, due to round-robin SOC0 converts first then SOC1
  ADC_setSocSampleWindow(myAdc, ADC_SocNumber_1, ADC_SocSampleWindow_7_cycles);   //set SOC0 S/H Window to 7 ADC Clock Cycles, (6 ACQPS plus 1)


}

//----------------------------------ADC Functions END-------------------------------------//



//----------------------------------PWM Functions START-------------------------------------//

void pwm_Init_()
{
    CLK_enablePwmClock(myClk, PWM_Number_1);
    // Setup TBCLK
    PWM_setPeriod(myPwm1, TBPRD);   // Set timer period 801 TBCLKs
    PWM_setPhase(myPwm1, 0x0000);   // Phase is 0
    PWM_setCount(myPwm1, 0x0000);   // Clear counter

    // Setup counter mode
    PWM_setCounterMode(myPwm1, PWM_CounterMode_UpDown); // Count up and down
    PWM_disableCounterLoad(myPwm1);                     // Disable phase loading
    PWM_setHighSpeedClkDiv(myPwm1, PWM_HspClkDiv_by_10); // Clock ratio to SYSCLKOUT
    PWM_setClkDiv(myPwm1, PWM_ClkDiv_by_1);

    ///setup for GPIO6 PWM
    // Setup shadowing
    PWM_setShadowMode_CmpA(myPwm1, PWM_ShadowMode_Shadow);
    PWM_setLoadMode_CmpA(myPwm1, PWM_LoadMode_Zero);
    // Set actions
    PWM_setActionQual_CntUp_CmpA_PwmA(myPwm1, PWM_ActionQual_Clear);      // Set PWM1A on event A, up count
    PWM_setActionQual_CntDown_CmpA_PwmA(myPwm1, PWM_ActionQual_Set);  // Clear PWM1A on event A, down count

    //SETUP for GPIO 7 PWM
    // Setup shadowing
    PWM_setShadowMode_CmpB(myPwm1, PWM_ShadowMode_Shadow);
    PWM_setLoadMode_CmpB(myPwm1, PWM_LoadMode_Zero);
    // Set actions
    PWM_setActionQual_CntUp_CmpB_PwmB(myPwm1, PWM_ActionQual_Clear);      // Set PWM1A on event A, up count
    PWM_setActionQual_CntDown_CmpB_PwmB(myPwm1, PWM_ActionQual_Set);  // Clear PWM1A on event A, down count
}
void set_duty( int a)
{
 CMPA = a;
 PWM_setCmpA(myPwm1, CMPA);
 PWM_setCmpB(myPwm1, CMPA);// Set compare A value
}



//----------------------------------PWM Functions END-------------------------------------//

//----------------------------------I2C Functions START-------------------------------------//



void I2CA_Init(void)
{
   I2caRegs.I2CSAR = 0x38;                // Slave address - EEPROM control code
   I2caRegs.I2CPSC.all = 6;                 // Prescaler - need 7-12 Mhz on module clk for 60MHz CPU
   I2caRegs.I2CCLKL = 4200;             // NOTE: must be non zero - set to 1kHz
   I2caRegs.I2CCLKH = 4200;             // NOTE: must be non zero - set to 1kHz
   I2caRegs.I2CIER.all = 0x3E;            // Enable SCD,XRDY,RRDY,ARDY,NACK interrupts
   I2caRegs.I2CMDR.bit.IRS = 1;        // Take I2C out of reset, Stop I2C when suspended
   I2caRegs.I2CFFTX.all = 0x0000;     // Enable FIFO mode and TXFIFO
   I2caRegs.I2CFFRX.all = 0x0000;     // Enable RXFIFO, clear RXFFINT,
   return;
}

//----------------------------------I2C Functions END-------------------------------------//



//----------------------------------UART/SCI Functions START-------------------------------------//

interrupt void sciaRxIsr(void)
{
 rx_data = SCI_getData(mySci);
 send_back(rx_data);
 PIE_clearInt(myPie, PIE_GroupNumber_9);
}

void scia_init()
{
    CLK_enableSciaClock(myClk);
    SCI_disableParity(mySci);
    SCI_setNumStopBits(mySci, SCI_NumStopBits_One);
    SCI_setCharLength(mySci, SCI_CharLength_8_Bits);
    SCI_enableRx(mySci);
    SCI_enableTx(mySci);
    SCI_enableRxInt(mySci);
    SCI_setBaudRate(mySci, SCI_BaudRate_9_6_kBaud);
    SCI_enable(mySci);
}

void scia_intpt_en()
{
 PIE_enable(myPie);
 PIE_registerPieIntHandler(myPie, PIE_GroupNumber_9, PIE_SubGroupNumber_1, (intVec_t)&sciaRxIsr);
 PIE_enableInt(myPie, PIE_GroupNumber_9, PIE_InterruptSource_SCIARX);
 CPU_enableInt(myCpu, CPU_IntNumber_9);
 CPU_enableGlobalInts(myCpu);  // Enable Global Interrupts
}

void scia_xmit(int a)
{
    while(SCI_getTxFifoStatus(mySci) != SCI_FifoStatus_Empty);  //while (SciaRegs.SCIFFTX.bit.TXFFST != 0) {}
    SCI_putDataBlocking(mySci, a);  // SciaRegs.SCITXBUF=a;
}

void send_msg()
{
 int i=0;
 while(msg[i]!='\0')
 {
  scia_xmit(msg[i]);
  i++;
 }
}

void send_back(char data)
{
 int i=0;
  while(msg2[i]!='\0')
  {
   scia_xmit(msg2[i]);
   i++;
  }
 scia_xmit(rx_data);
 scia_xmit('\r');
 scia_xmit('\n');
}

//----------------------------------UART/SCI Functions END-------------------------------------//


//===========================================================================
// No more.
//===========================================================================


Now whenever I try to compile it i get the following errors as seen here in the log file:

-l"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/CCS_WKspace/Example_F2802xAdcTempSensor/../../f2802x_common/cmd/F2802x_generic_flash.cmd" -l"rts2800_ml.lib" -l"IQmath.lib"
error: cannot find file
"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/CCS_WKspace/Example
_F2802xAdcTempSensor/../../f2802x_common/cmd/F2802x_generic_flash.cmd"
warning: creating output section ".cinit" without a SECTIONS specification
warning: creating output section ".ebss" without a SECTIONS specification
warning: creating output section ".econst" without a SECTIONS specification
warning: creating output section ".reset" without a SECTIONS specification
warning: creating output section ".text" without a SECTIONS specification
warning: creating output section "codestart" without a SECTIONS specification
warning: creating output section "ramfuncs" without a SECTIONS specification
error: no valid memory range(NULL) available for placement of ".text"
error: program will not fit into available memory. placement with
alignment/blocking fails for section ".text" size 0xcce page 0
error: program will not fit into available memory. placement with
alignment/blocking fails for section ".econst" size 0x200 page 0. Available
memory ranges:

error: program will not fit into available memory. placement with
alignment/blocking fails for section ".cinit" size 0xae page 0. Available
memory ranges:

error: program will not fit into available memory. run placement with
alignment/blocking fails for section ".ebss" size 0x9b page 1. Available
memory ranges:
DEV_EMU size: 0x105 unused: 0x1 max hole: 0x1
SYS_PWR_CTL size: 0x3 unused: 0x0 max hole: 0x0
FLASH_REGS size: 0x60 unused: 0x58 max hole: 0x58
CSM size: 0x10 unused: 0x0 max hole: 0x0
ADC_RESULT size: 0x20 unused: 0x0 max hole: 0x0
CPU_TIMER0 size: 0x8 unused: 0x0 max hole: 0x0
CPU_TIMER1 size: 0x8 unused: 0x0 max hole: 0x0
CPU_TIMER2 size: 0x8 unused: 0x0 max hole: 0x0
PIE_CTRL size: 0x20 unused: 0x6 max hole: 0x6
PIE_VECT size: 0x100 unused: 0x0 max hole: 0x0
COMP1 size: 0x20 unused: 0xf max hole: 0xf
COMP2 size: 0x20 unused: 0xf max hole: 0xf
EPWM1 size: 0x40 unused: 0x0 max hole: 0x0
EPWM2 size: 0x40 unused: 0x0 max hole: 0x0
EPWM3 size: 0x40 unused: 0x0 max hole: 0x0
EPWM4 size: 0x40 unused: 0x0 max hole: 0x0
ECAP1 size: 0x20 unused: 0x0 max hole: 0x0
GPIOCTRL size: 0x40 unused: 0x0 max hole: 0x0
GPIODAT size: 0x20 unused: 0x0 max hole: 0x0
GPIOINT size: 0x20 unused: 0x16 max hole: 0x16
SYSTEM size: 0x20 unused: 0x1 max hole: 0x1
SPIA size: 0x10 unused: 0x0 max hole: 0x0
SCIA size: 0x10 unused: 0x0 max hole: 0x0
NMIINTRUPT size: 0x10 unused: 0x0 max hole: 0x0
XINTRUPT size: 0x10 unused: 0x0 max hole: 0x0
ADC size: 0x80 unused: 0x2f max hole: 0x2f
I2CA size: 0x40 unused: 0x1e max hole: 0x1e
PARTID size: 0x1 unused: 0x0 max hole: 0x0
CSM_PWL size: 0x8 unused: 0x0 max hole: 0x0
error: program will not fit into available memory. placement with
alignment/blocking fails for section "ramfuncs" size 0x5a page 0. Available
memory ranges:

error: program will not fit into available memory. placement with
alignment/blocking fails for section ".reset" size 0x2 page 0. Available
memory ranges:

error: program will not fit into available memory. placement with
alignment/blocking fails for section "codestart" size 0x2 page 0. Available
memory ranges:


undefined first referenced
symbol in file
--------- ----------------
_RamfuncsLoadSize ./Example_2802xAdcTempSensor.obj
_RamfuncsLoadStart ./Example_2802xAdcTempSensor.obj
_RamfuncsRunStart ./Example_2802xAdcTempSensor.obj

error: unresolved symbols remain
error: errors encountered during linking; "Example_F2802xAdcTempSensor.out" not

built
>> Compilation failure
gmake: *** [Example_F2802xAdcTempSensor.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

I am using a C2000 TMS320F28027 chip so I know that the code above is not maxing out the memory, thus the problem has to be in the linker. 

Here is my current CCS General setup is as seen below:

I have tried everything to fix this problem, however so  far no progress.

Any and all help is appreciated.

Thank you in advance,

Carlo 

  • Carlo Bocatto said:
    error: cannot find file
    "C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/CCS_WKspace/Example
    _F2802xAdcTempSensor/../../f2802x_common/cmd/F2802x_generic_flash.cmd"

    Focus on this error. The linker is not able to find that file in that path. The f2802x_common directory is in ControlSuite so unless you copied over the entire contents of the f2802x directory from ControlSuite to your workspace, this path should point to the correct file within ControlSuite.

    You can find this setting under Project Properties->Build->Linker->File Search Path.

  • Hey AartiG,

    So I went ahead and pointed the linker in the right direction however now I'm getting the error below:

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all 
    'Building target: Example_F2802xAdcTempSensor.out'
    'Invoking: C2000 Linker'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data -z -m"Example_F2802xAdcTempSensor.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.2.0/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" -i"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/CCS_WKspace/F2802xADCTempRebuilt" -i"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/f2802x_common/lib" -i"C:/Users/Carlo/libs/math/IQmath/v15c/lib" --reread_libs --verbose_diagnostics --issue_remarks --xml_link_info="Example_F2802xAdcTempSensor_linkInfo.xml" --entry_point=code_start --rom_model -o "Example_F2802xAdcTempSensor.out"  "../Debug/F2802x_usDelay.obj" "../Debug/F2802x_SysCtrl.obj" "../Debug/F2802x_PieVect.obj" "../Debug/F2802x_PieCtrl.obj" "../Debug/F2802x_I2C.obj" "../Debug/F2802x_DefaultIsr.obj" "../Debug/F2802x_CpuTimers.obj" "../Debug/F2802x_CodeStartBranch.obj" "../Debug/Example_2802xAdcTempSensor.obj" "./F2802x_usDelay.obj" "./F2802x_SysCtrl.obj" "./F2802x_PieVect.obj" "./F2802x_PieCtrl.obj" "./F2802x_I2C.obj" "./F2802x_DefaultIsr.obj" "./F2802x_CpuTimers.obj" "./F2802x_CodeStartBranch.obj" "./Example_2802xAdcTempSensor.obj" "../F2802x_Headers_nonBIOS.cmd" "../F2802x_generic_flash.cmd" "../IQmath.lib" "../driverlib.lib" "../lib/IQmath.lib" "../lib/driverlib.lib" -l"C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd" -l"rts2800_ml.lib" -l"IQmath.lib" 
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 71: error: 
       RAMM0 memory range has already been specified
       RAMM0       : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 71: error: 
       RAMM0 memory range overlaps existing memory range RAMM0
       RAMM0       : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 72: error: 
       OTP memory range has already been specified
       OTP         : origin = 0x3D7800, length = 0x000400     /* on-chip OTP */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 72: error: 
       OTP memory range overlaps existing memory range OTP
       OTP         : origin = 0x3D7800, length = 0x000400     /* on-chip OTP */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 73: error: 
       FLASHA memory range has already been specified
       FLASHA      : origin = 0x3F7000, length = 0x000F80     /* on-chip FLASH */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 73: error: 
       FLASHA memory range overlaps existing memory range FLASHA
       FLASHA      : origin = 0x3F7000, length = 0x000F80     /* on-chip FLASH */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 74: error: 
       CSM_RSVD memory range has already been specified
       CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 74: error: 
       CSM_RSVD memory range overlaps existing memory range CSM_RSVD
       CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 75: error: 
       BEGIN memory range has already been specified
       BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 75: error: 
       BEGIN memory range overlaps existing memory range BEGIN
       BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 76: error: 
       CSM_PWL_P0 memory range has already been specified
       CSM_PWL_P0  : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 76: error: 
       CSM_PWL_P0 memory range overlaps existing memory range CSM_PWL_P0
       CSM_PWL_P0  : origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 77: error: 
       FLASHB memory range has already been specified
       FLASHB      : origin = 0x3F6000, length = 0x001000     /* on-chip FLASH */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 77: error: 
       FLASHB memory range overlaps existing memory range FLASHB
       FLASHB      : origin = 0x3F6000, length = 0x001000     /* on-chip FLASH */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 81: error: 
       IQTABLES memory range has already been specified
       IQTABLES    : origin = 0x3FE000, length = 0x000B50     /* IQ Math Tables in Boot ROM */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 81: error: 
       IQTABLES memory range overlaps existing memory range IQTABLES
       IQTABLES    : origin = 0x3FE000, length = 0x000B50     /* IQ Math Tables in Boot ROM */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 82: error: 
       IQTABLES2 memory range has already been specified
       IQTABLES2   : origin = 0x3FEB50, length = 0x00008C     /* IQ Math Tables in Boot ROM */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 82: error: 
       IQTABLES2 memory range overlaps existing memory range IQTABLES2
       IQTABLES2   : origin = 0x3FEB50, length = 0x00008C     /* IQ Math Tables in Boot ROM */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 83: error: 
       IQTABLES3 memory range has already been specified
       IQTABLES3   : origin = 0x3FEBDC, length = 0x0000AA      /* IQ Math Tables in Boot ROM */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 83: error: 
       IQTABLES3 memory range overlaps existing memory range IQTABLES3
       IQTABLES3   : origin = 0x3FEBDC, length = 0x0000AA      /* IQ Math Tables in Boot ROM */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 85: error: 
       ROM memory range has already been specified
       ROM         : origin = 0x3FF27C, length = 0x000D44     /* Boot ROM */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 85: error: 
       ROM memory range overlaps existing memory range ROM
       ROM         : origin = 0x3FF27C, length = 0x000D44     /* Boot ROM */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 86: error: 
       RESET memory range has already been specified
       RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM  */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 86: error: 
       RESET memory range overlaps existing memory range RESET
       RESET       : origin = 0x3FFFC0, length = 0x000002     /* part of boot ROM  */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 87: error: 
       VECTORS memory range has already been specified
       VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 87: error: 
       VECTORS memory range overlaps existing memory range VECTORS
       VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 93: error: 
       BOOT_RSVD memory range has already been specified
       BOOT_RSVD   : origin = 0x000000, length = 0x000050     /* Part of M0, BOOT rom will use this for stack */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 93: error: 
       BOOT_RSVD memory range overlaps existing memory range BOOT_RSVD
       BOOT_RSVD   : origin = 0x000000, length = 0x000050     /* Part of M0, BOOT rom will use this for stack */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 94: error: 
       RAMM1 memory range has already been specified
       RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 94: error: 
       RAMM1 memory range overlaps existing memory range RAMM1
       RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 95: error: 
       RAML0 memory range has already been specified
       RAML0       : origin = 0x008000, length = 0x000400     /* on-chip RAM block L0 */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 95: error: 
       RAML0 memory range overlaps existing memory range RAML0
       RAML0       : origin = 0x008000, length = 0x000400     /* on-chip RAM block L0 */
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 114: warning: 
       absolute symbol "_RamfuncsLoadStart" being redefined
                             LOAD_START(_RamfuncsLoadStart),
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 115: warning: 
       absolute symbol "_RamfuncsLoadSize" being redefined
                             LOAD_SIZE(_RamfuncsLoadSize),
    "C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd", line 116: warning: 
       absolute symbol "_RamfuncsRunStart" being redefined
                             RUN_START(_RamfuncsRunStart),
    error: symbol "_DSP28x_usDelay" redefined: first defined in
       "../Debug/F2802x_usDelay.obj"; redefined in "./F2802x_usDelay.obj"
    error: symbol "_InitPll" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_IntOsc1Sel" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_ExtOscSel" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_DisableDog" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_InitPeripheralClocks" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_IntOsc2Sel" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_InitFlash" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_CsmUnlock" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_ServiceDog" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_XtalOscSel" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_InitSysCtrl" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_PieVectTableInit" redefined: first defined in
       "../Debug/F2802x_PieVect.obj"; redefined in "./F2802x_PieVect.obj"
    error: symbol "_InitPieVectTable" redefined: first defined in
       "../Debug/F2802x_PieVect.obj"; redefined in "./F2802x_PieVect.obj"
    error: symbol "_InitPieCtrl" redefined: first defined in
       "../Debug/F2802x_PieCtrl.obj"; redefined in "./F2802x_PieCtrl.obj"
    error: symbol "_EnableInterrupts" redefined: first defined in
       "../Debug/F2802x_PieCtrl.obj"; redefined in "./F2802x_PieCtrl.obj"
    error: symbol "_InitI2C" redefined: first defined in "../Debug/F2802x_I2C.obj";
       redefined in "./F2802x_I2C.obj"
    error: symbol "_InitI2CGpio" redefined: first defined in
       "../Debug/F2802x_I2C.obj"; redefined in "./F2802x_I2C.obj"
    error: symbol "_ILLEGAL_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT4_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_DATALOG_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_SPITXINTA_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_SPIRXINTA_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_INT13_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT5_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM4_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER5_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EMPTY_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM4_TZINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EMUINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ECAP1_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM1_TZINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT6_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT8_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER11_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM3_TZINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER4_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM2_TZINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM2_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_TINT0_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_WAKEINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT7_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT9_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER10_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER7_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_XINT1_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_INT14_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER6_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT1_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER12_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER1_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_XINT3_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_NMI_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT2_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_PIE_RESERVED" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_I2CINT1A_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_XINT2_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_I2CINT2A_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_RTOSINT_ISR" redefined: first defined in
    
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    >> Compilation failure
    error: symbol "_EPWM3_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT3_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER9_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER3_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER8_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM1_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER2_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_SCITXINTA_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_SCIRXINTA_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_rsvd_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    fatal error: error limit reached; 100 errors detected
    gmake: *** [Example_F2802xAdcTempSensor.out] Error 1
    gmake: Target `all' not remade because of errors.
    
    **** Build Finished ****

    However I have not touched the flash file.This code is already verified to run however I'm not truly sure as to why it is not building. I have gotten it to build on my other computer so I know that it will fit and that everything should work fine.

    Thank you in advance,

    Carlo 

  • My first suggestion would be to import the example project Example_2802xAdcTempSensor as-is from ControlSuite, and study the structure and files that are part of the project, specifically the linker command files (.cmd). You should see two linker command files in the project - F2802x_generic_ram.cmd and F2802x_Headers_nonBIOS.cmd. Both these files are required for a successful build, and each should only be specified once in the link command.

    It appears that you are using F2802x_generic_flash.cmd instead of F2802x_generic_ram.cmd, and that is ok as long as you have taken the necessary steps to allow the program to run from flash. But pay close attention to the linker command that you see in the CCS build console. Yours looks like this:

    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data -z -m"Example_F2802xAdcTempSensor.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.2.0/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" -i"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/CCS_WKspace/F2802xADCTempRebuilt" -i"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/f2802x_common/lib" -i"C:/Users/Carlo/libs/math/IQmath/v15c/lib" --reread_libs --verbose_diagnostics --issue_remarks --xml_link_info="Example_F2802xAdcTempSensor_linkInfo.xml" --entry_point=code_start --rom_model -o "Example_F2802xAdcTempSensor.out"  "../Debug/F2802x_usDelay.obj" "../Debug/F2802x_SysCtrl.obj" "../Debug/F2802x_PieVect.obj" "../Debug/F2802x_PieCtrl.obj" "../Debug/F2802x_I2C.obj" "../Debug/F2802x_DefaultIsr.obj" "../Debug/F2802x_CpuTimers.obj" "../Debug/F2802x_CodeStartBranch.obj" "../Debug/Example_2802xAdcTempSensor.obj" "./F2802x_usDelay.obj" "./F2802x_SysCtrl.obj" "./F2802x_PieVect.obj" "./F2802x_PieCtrl.obj" "./F2802x_I2C.obj" "./F2802x_DefaultIsr.obj" "./F2802x_CpuTimers.obj" "./F2802x_CodeStartBranch.obj" "./Example_2802xAdcTempSensor.obj" "../F2802x_Headers_nonBIOS.cmd" "../F2802x_generic_flash.cmd" "../IQmath.lib" "../driverlib.lib" "../lib/IQmath.lib" "../lib/driverlib.lib" -l"C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_common\cmd\F2802x_generic_flash.cmd" -l"rts2800_ml.lib" -l"IQmath.lib"


    Notice how F2802x_generic_flash.cmd is passed twice to the linker. It should only be passed once, either as part of the project (with the file added or linked to the project) or via the -l linker option. Please remove one or the other and rebuild.

  • ArtiG,

    I went ahead and removed the flash.cmd file from the linker and left it in the work-space as seen here:

    Now after I did that I refreshed, cleaned, and rebuilt the project and came up with these errors:

    **** Build of configuration Flash for project F2802xADCTempRebuilt ****
    
    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all 
    'Building file: ../Example_2802xAdcTempSensor.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="Example_2802xAdcTempSensor.pp"  "../Example_2802xAdcTempSensor.c"
    "../Example_2802xAdcTempSensor.c", line 179: warning: enumerated type mixed
              with another type
          	adc_slide_pot = ADC_readResult(myAdc, ADC_SocNumber_0);
          	                                      ^
    
    "../Example_2802xAdcTempSensor.c", line 180: warning: enumerated type mixed
              with another type
          	adc_button = ADC_readResult(myAdc, ADC_SocNumber_1 );
          	                                   ^
    
    'Finished building: ../Example_2802xAdcTempSensor.c'
    ' '
    'Building file: ../F2802x_CodeStartBranch.asm'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="F2802x_CodeStartBranch.pp"  "../F2802x_CodeStartBranch.asm"
    'Finished building: ../F2802x_CodeStartBranch.asm'
    ' '
    'Building file: ../F2802x_CpuTimers.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="F2802x_CpuTimers.pp"  "../F2802x_CpuTimers.c"
    'Finished building: ../F2802x_CpuTimers.c'
    ' '
    'Building file: ../F2802x_DefaultIsr.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="F2802x_DefaultIsr.pp"  "../F2802x_DefaultIsr.c"
    'Finished building: ../F2802x_DefaultIsr.c'
    ' '
    'Building file: ../F2802x_I2C.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="F2802x_I2C.pp"  "../F2802x_I2C.c"
    'Finished building: ../F2802x_I2C.c'
    ' '
    'Building file: ../F2802x_PieCtrl.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="F2802x_PieCtrl.pp"  "../F2802x_PieCtrl.c"
    'Finished building: ../F2802x_PieCtrl.c'
    ' '
    'Building file: ../F2802x_PieVect.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="F2802x_PieVect.pp"  "../F2802x_PieVect.c"
    'Finished building: ../F2802x_PieVect.c'
    ' '
    'Building file: ../F2802x_SysCtrl.c'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="F2802x_SysCtrl.pp"  "../F2802x_SysCtrl.c"
    'Finished building: ../F2802x_SysCtrl.c'
    ' '
    'Building file: ../F2802x_usDelay.asm'
    'Invoking: C2000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff --include_path="C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/source" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" --include_path="C:/ti/controlSUITE/libs/math/IQmath/v15c/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data --preproc_with_compile --preproc_dependency="F2802x_usDelay.pp"  "../F2802x_usDelay.asm"
    'Finished building: ../F2802x_usDelay.asm'
    ' '
    'Building target: Example_F2802xAdcTempSensor.out'
    'Invoking: C2000 Linker'
    "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data -z -m"Example_F2802xAdcTempSensor.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.2.0/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" -i"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/CCS_WKspace/F2802xADCTempRebuilt" -i"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/f2802x_common/lib" -i"C:/Users/Carlo/libs/math/IQmath/v15c/lib" --reread_libs --verbose_diagnostics --issue_remarks --xml_link_info="Example_F2802xAdcTempSensor_linkInfo.xml" --entry_point=code_start --rom_model -o "Example_F2802xAdcTempSensor.out"  "../Debug/F2802x_usDelay.obj" "../Debug/F2802x_SysCtrl.obj" "../Debug/F2802x_PieVect.obj" "../Debug/F2802x_PieCtrl.obj" "../Debug/F2802x_I2C.obj" "../Debug/F2802x_DefaultIsr.obj" "../Debug/F2802x_CpuTimers.obj" "../Debug/F2802x_CodeStartBranch.obj" "../Debug/Example_2802xAdcTempSensor.obj" "./F2802x_usDelay.obj" "./F2802x_SysCtrl.obj" "./F2802x_PieVect.obj" "./F2802x_PieCtrl.obj" "./F2802x_I2C.obj" "./F2802x_DefaultIsr.obj" "./F2802x_CpuTimers.obj" "./F2802x_CodeStartBranch.obj" "./Example_2802xAdcTempSensor.obj" "../F2802x_Headers_nonBIOS.cmd" "../F2802x_generic_flash.cmd" "../IQmath.lib" "../driverlib.lib" "../lib/IQmath.lib" "../lib/driverlib.lib" -l"rts2800_ml.lib" -l"IQmath.lib" 
    error: symbol "_DSP28x_usDelay" redefined: first defined in
       "../Debug/F2802x_usDelay.obj"; redefined in "./F2802x_usDelay.obj"
    error: symbol "_InitPll" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_IntOsc1Sel" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_ExtOscSel" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_DisableDog" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_InitPeripheralClocks" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_IntOsc2Sel" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_InitFlash" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_CsmUnlock" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_ServiceDog" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_XtalOscSel" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_InitSysCtrl" redefined: first defined in
       "../Debug/F2802x_SysCtrl.obj"; redefined in "./F2802x_SysCtrl.obj"
    error: symbol "_PieVectTableInit" redefined: first defined in
       "../Debug/F2802x_PieVect.obj"; redefined in "./F2802x_PieVect.obj"
    error: symbol "_InitPieVectTable" redefined: first defined in
       "../Debug/F2802x_PieVect.obj"; redefined in "./F2802x_PieVect.obj"
    error: symbol "_InitPieCtrl" redefined: first defined in
       "../Debug/F2802x_PieCtrl.obj"; redefined in "./F2802x_PieCtrl.obj"
    error: symbol "_EnableInterrupts" redefined: first defined in
       "../Debug/F2802x_PieCtrl.obj"; redefined in "./F2802x_PieCtrl.obj"
    error: symbol "_InitI2C" redefined: first defined in "../Debug/F2802x_I2C.obj";
       redefined in "./F2802x_I2C.obj"
    error: symbol "_InitI2CGpio" redefined: first defined in
       "../Debug/F2802x_I2C.obj"; redefined in "./F2802x_I2C.obj"
    error: symbol "_ILLEGAL_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT4_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_DATALOG_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_SPITXINTA_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_SPIRXINTA_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_INT13_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT5_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM4_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER5_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EMPTY_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM4_TZINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EMUINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ECAP1_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM1_TZINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT6_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT8_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER11_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM3_TZINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER4_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM2_TZINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM2_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_TINT0_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_WAKEINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT7_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT9_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER10_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER7_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_XINT1_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_INT14_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER6_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT1_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER12_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER1_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_XINT3_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_NMI_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT2_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_PIE_RESERVED" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_I2CINT1A_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_XINT2_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_I2CINT2A_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_RTOSINT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM3_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_ADCINT3_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER9_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER3_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER8_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_EPWM1_INT_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_USER2_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_SCITXINTA_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_SCIRXINTA_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_rsvd_ISR" redefined: first defined in
       "../Debug/F2802x_DefaultIsr.obj"; redefined in "./F2802x_DefaultIsr.obj"
    error: symbol "_CpuTimer2" redefined: first defined in
       "../Debug/F2802x_CpuTimers.obj"; redefined in "./F2802x_CpuTimers.obj"
    error: symbol "_CpuTimer0" redefined: first defined in
       "../Debug/F2802x_CpuTimers.obj"; redefined in "./F2802x_CpuTimers.obj"
    error: symbol "_CpuTimer1" redefined: first defined in
       "../Debug/F2802x_CpuTimers.obj"; redefined in "./F2802x_CpuTimers.obj"
    error: symbol "_InitCpuTimers" redefined: first defined in
       "../Debug/F2802x_CpuTimers.obj"; redefined in "./F2802x_CpuTimers.obj"
    error: symbol "_ConfigCpuTimer" redefined: first defined in
       "../Debug/F2802x_CpuTimers.obj"; redefined in "./F2802x_CpuTimers.obj"
    error: symbol "code_start" redefined: first defined in
       "../Debug/F2802x_CodeStartBranch.obj"; redefined in
       "./F2802x_CodeStartBranch.obj"
    error: symbol "_main" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_adc_isr" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_adc_button_max" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_adc_slide_max" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_instr" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_Current_state" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_delta" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_myPwm1" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_msg2" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_Motor_stop" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_adc_slide_pot" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_adc_button_min" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_scia_init" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_adc_slide_min" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_myPie" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_data" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_myPll" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_adc_button" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_myWDog" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_Previous_state" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_msg" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_xint1_isr" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_scia_xmit" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_ADC_INIT_Fn" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
    
       "./Example_2802xAdcTempSensor.obj"
    >> Compilation failure
    error: symbol "_mySci" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    error: symbol "_myCpu" redefined: first defined in
       "../Debug/Example_2802xAdcTempSensor.obj"; redefined in
       "./Example_2802xAdcTempSensor.obj"
    fatal error: error limit reached; 100 errors detected
    gmake: *** [Example_F2802xAdcTempSensor.out] Error 1
    gmake: Target `all' not remade because of errors.
    
    **** Build Finished ****
    

    I tried to fix this by linking it to the global variable define as i saw this issue resolved in other e2e posts however, the GlobalVariableDefine file does not exist within the f2802x file. I did notice that this file was usually located within the source folder so i went ahead and tried linking the compiler and the linker to the source folder however both attempts were unsuccessful, thus i am left the errors seen above.

  • Carlo Bocatto said:
    'Building target: Example_F2802xAdcTempSensor.out' 'Invoking: C2000 Linker' "C:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000" -v28 -ml -mt -Ooff -g --define="_DEBUG" --define="_FLASH" --define="LARGE_MODEL" --quiet --verbose_diagnostics --diag_warning=225 --diag_suppress=232 --diag_suppress=10063 --output_all_syms --cdebug_asm_data -z -m"Example_F2802xAdcTempSensor.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.2.0/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.2.0/include" -i"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/CCS_WKspace/F2802xADCTempRebuilt" -i"C:/Users/Carlo/Documents/GIT_Controlled_Projects/falcon/f2802x_common/lib" -i"C:/Users/Carlo/libs/math/IQmath/v15c/lib" --reread_libs --verbose_diagnostics --issue_remarks --xml_link_info="Example_F2802xAdcTempSensor_linkInfo.xml" --entry_point=code_start --rom_model -o "Example_F2802xAdcTempSensor.out" "../Debug/F2802x_usDelay.obj" "../Debug/F2802x_SysCtrl.obj" "../Debug/F2802x_PieVect.obj" "../Debug/F2802x_PieCtrl.obj" "../Debug/F2802x_I2C.obj" "../Debug/F2802x_DefaultIsr.obj" "../Debug/F2802x_CpuTimers.obj" "../Debug/F2802x_CodeStartBranch.obj" "../Debug/Example_2802xAdcTempSensor.obj" "./F2802x_usDelay.obj" "./F2802x_SysCtrl.obj" "./F2802x_PieVect.obj" "./F2802x_PieCtrl.obj" "./F2802x_I2C.obj" "./F2802x_DefaultIsr.obj" "./F2802x_CpuTimers.obj" "./F2802x_CodeStartBranch.obj" "./Example_2802xAdcTempSensor.obj" "../F2802x_Headers_nonBIOS.cmd" "../F2802x_generic_flash.cmd" "../IQmath.lib" "../driverlib.lib" "../lib/IQmath.lib" "../lib/driverlib.lib" -l"rts2800_ml.lib" -l"IQmath.lib"

    From this command, I see that all the .obj files are being passed twice to the linker, one from the current build configuration and one from the /Debug subdirectory. The same thing is happening for IQmath.lib and driverlib.lib - they are coming from two different places. I don't know how this happened for your project but that is the reason for the "symbol redefined" errors.

    As I suggested earlier, the best course of action would be to import the example project Example_2802xAdcTempSensor as-is from ControlSuite (without any modifications) and take a look at the files that are part of the project and understand how they fit in in the build process. There is a lot of good information about the project and build system and the most common files in a CCS project in this wiki:
    http://processors.wiki.ti.com/index.php/Projects_and_Build_Handbook_for_CCS

  • I went ahead and got it working! I am not sure what happened during the transfer however, I was able to get it working by copying and pasting the working project into my new work space and then re-linking the necessary files. Thank you, for your help ArtiG!!!!

    -Carlo