调试时可以将读写时间设为最大,然后一点一点降低,直到能稳定读写的最小时间。记得在main函数里调用InitXintf(),如:
void main(void)
{
InitSysCtrl();
InitXintf();
……..
}
2.2 CMD文件的编写
上述步骤完成之后,就可以编写CMD,写法请参考其他资料。以下是我写的CMD文件,可以根据个人爱好适当更改。同时该CMD文件一定要跟DSP281x_Headers_nonBIOS.cmd(可以在TI网站上下载)配合使用,即两个CMD都要加入工程里面。
MEMORY
{
PAGE 0 :
RAMM0 : origin = 0x000000, length = 0x000400
PRAMH0 : origin = 0x3F8002, length = 0x000FFE
BEGIN : origin = 0x3F8000, length = 0x000002
BOOTROM (RW) : origin = 0x3ff000, length = 0x000fc0
VECTORS (RW) : origin = 0x3fffc2, length = 0x00003e
RESET : origin = 0x3FFFC0, length = 0x000002
ZONE2 : origin = 0x080000, length = 0x03ffff
PAGE 1 :
RAMM1 : origin = 0x000400, length = 0x000400
DRAMH0 : origin = 0x3f9000, length = 0x001000
ZONE2 : origin = 0x0C0000, length = 0x03ffff
}
SECTIONS
{
codestart : > BEGIN, PAGE = 0
ramfuncs : > PRAMH0, PAGE = 0
.text : > ZONE2, PAGE = 0
.cinit : > ZONE2, PAGE = 0
.pinit : > ZONE2, PAGE = 0
.switch : > RAMM0, PAGE = 0
.reset : > RESET, PAGE = 0, TYPE = DSECT
.stack : > RAMM1, PAGE = 1
.ebss : > ZONE2, PAGE = 1
.econst : > DRAMH0, PAGE = 1
.esysmem : > DRAMH0, PAGE = 1
IQmathTables : load = BOOTROM, type = NOLOAD, PAGE = 0
IQmath : load = PRAMH0, PAGE = 0
} |