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.

28027从FLASH中运行的问题

编译提示出错,CCS5.5

/*
* main.c
*/

/* GPIO0,1,2,3 --> LED
*
*/
/////////////////////////////////////////////////////////
// Header include
#include "DSP28x_Project.h"
//#include "stdio.h"

char * rxch = "XYZ";

extern struct TXDATASTRUCT rxdata;


/////////////////////////////////////////////////////////
// defined

#ifdef TOFLASH
extern void MemCopy(Uint16 *SourceAddr, Uint16* SourceEndAddr, Uint16* DestAddr);
extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadEnd;
extern Uint16 RamfuncsRunStart;

#endif


void main(void)

{
// Uint16 a;
InitSysCtrl();
InitGpio();
InitSciaGpio();

DINT;
InitPieCtrl();

IER = 0x0000;
IFR = 0x0000;

InitPieVectTable();

#ifdef TOFLASH

MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();
#endif

rxdata.pCh = "ABC";
rxdata.pos = 0;
scia_fifo_init();
InitCpuTimers();
InitEPwm1();
ConfigCpuTimer(&CpuTimer0, 60, 500000);
ConfigCpuTimer(&CpuTimer1, 60, 1000);
CpuTimer0Regs.TCR.all = 0x4001; // Use write-only instruction to set TSS bit = 0
CpuTimer1Regs.TCR.all = 0x4001; // start

IER |= M_INT1; // timer0
IER |= M_INT9; // SCI
IER |= M_INT13; // timer1

PieCtrlRegs.PIEIER1.bit.INTx7 = 1; // timer0 (1.7)
//PieCtrlRegs.PIEIER9.bit.INTx1 = 1; // SCI RX interrupt
PieCtrlRegs.PIEIER9.bit.INTx2 = 1; // SCI TX interrupt
//PieCtrlRegs

EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM


for (;;)
{
DELAY_US(400000L);
DELAY_US(400000L);
DELAY_US(400000L);
DELAY_US(400000L);
uart_sendstring("EEWorld_\n");
GpioDataRegs.GPATOGGLE.bit.GPIO2 = 1;
}
}