我用的芯片是TMS320VC5402 CD-OBA94FW,我想让XF脚输出一个方波,程序编译都能通过,但是下载的时候ccs老是提示如下:
https://bbs.21ic.com/upfiles/img/20076/200766112414294.jpg 这是不是我所用的DSP芯片内部没有内存的啊
源代码如下: unsigned int *pmem=0; #define IMR *(pmem+0x0000) #define IFR *(pmem+0x0001) #define PMST *(pmem+0x001d) #define SWCR *(pmem+0x002b) #define SWWSR *(pmem+0x0028) #define CLKMD *(pmem+0x0058) #define ST1 *(pmem+0x007) #define PRD0 *(pmem+0x0025) /* timer0 period register */ #define TCR0 *(pmem+0x0026) /* timer0 control register */ //ioport unsigned portc002; //指示灯地址 void cpu_init(); /*初始化DSP*/ void delay100ms(); /*--------------------------------------------------------------**/ void cpu_init() /*初始化DSP*/ { asm(" ssbx intm"); asm(" ssbx xf "); //总清零 PMST=0x120; SWWSR=0x7fff; SWCR=0x0001; IMR=0x00; IFR=0xffff; CLKMD=0x1007; asm(" ssbx intm"); //打开数据口 asm(" rsbx xf "); } //------------------------------------------------------- void delay100ms() { int i,j,k; for (i=0;i<140;i++) for (j=0;j<220;j++) for (k=0;k<100;k++); } //------------------------------------------------------- void main() { cpu_init(); for(;;) { asm(" ssbx xf "); delay100ms(); asm(" rsbx xf "); delay100ms(); } }
CMD如下 -c -h test1.obj -m test.map -l rts.lib -stack 0x500
MEMORY { PAGE 0: PROG: origin = 0100h, length = 1000h PAGE 1: DATA: origin = 0f000h, length = 1000h }
SECTIONS { //vect > 100h PAGE 0 .text > PROG PAGE 0 .cinit > PROG PAGE 0 .switch > PROG PAGE 0 .data > DATA PAGE 1 .const > DATA PAGE 1 .bss > DATA PAGE 1 .sysmem > DATA PAGE 1 .stack > DATA PAGE 1 }
|