CCS内存分配问题
在下用的是DSP:DM642,编程用C,平台CCS3.1,计算机仿真。程序在TC上能跑,但是到CCS上提示:Trouble running Target CPU: Memory Map Error: WRITE access by Default to address 0xffffe1c8, which is RESERVED in Hardware.
是不是lnk.cmd的问题,还是DM642sim.gel文件的问题?跪求各位大侠了,在下当以分报之:
附上lnk.cmd文件和DM642sim.gel文件:
-stack 0x500
-heap 0x500
MEMORY
{
L2 : o = 00000000h l = 40000h /* all SRAM */
CE0: o = 80000000h l = 2000000h /* external memory */
}
SECTIONS
{
.cinit > L2
.text > L2
.stack > L2
.bss > L2
.const > L2
.data > L2
.far > L2
.switch > L2
.sysmem > L2
.tables > L2
.cio > L2
/*.external > CE0*/
.syncframebuf>CE0
.sendbytesbuf>CE0
.sendsymsbuf>CE0
.outsendsymsbuf>CE0
.recvbuf>CE0
.highpointbuf>CE0
}
DM642.gel:
emif_init()
{
#define EMIFA_GCTL 0x01800000
#define EMIFA_CE1 0x01800004
#define EMIFA_CE0 0x01800008
#define EMIFA_CE2 0x01800010
#define EMIFA_CE3 0x01800014
#define EMIFA_SDRAMCTL 0x01800018
#define EMIFA_SDRAMTIM 0x0180001c
#define EMIFA_SDRAMEXT 0x01800020
#define EMIFA_CE1SECCTL 0x01800044
#define EMIFA_CE0SECCTL 0x01800048
#define EMIFA_CE2SECCTL 0x01800050
#define EMIFA_CE3SECCTL 0x01800054
#define EMIFB_GCTL 0x01A80000
#define EMIFB_CE1 0x01A80004
#define EMIFB_CE0 0x01A80008
#define EMIFB_CE2 0x01A80010
#define EMIFB_CE3 0x01A80014
#define EMIFB_SDRAMCTL 0x01A80018
#define EMIFB_SDRAMTIM 0x01A8001c
#define EMIFB_SDRAMEXT 0x01A80020
#define EMIFB_CE1SECCTL 0x01A80044
#define EMIFB_CE0SECCTL 0x01A80048
#define EMIFB_CE2SECCTL 0x01A80050
#define EMIFB_CE3SECCTL 0x01A80054
/* EMIFA */
*(int *)EMIFA_GCTL = 0x00012070;
*(int *)EMIFA_CE0 = 0xffffffd3; /* CE0 SDRAM */
*(int *)EMIFA_CE2 = 0x22a28a22; /* CE2 Daughtercard 32-bit async */
*(int *)EMIFA_CE3 = 0x22a28a22; /* CE3 Daughtercard 32-bit async */
*(int *)EMIFA_SDRAMCTL = 0x47115000; /* SDRAM control */
*(int *)EMIFA_SDRAMTIM = 0x00000618; /* SDRAM timing (refresh) */
*(int *)EMIFA_SDRAMEXT = 0x000a8529; /* SDRAM extended control */
/* EMIFB */
*(int *)EMIFB_GCTL = 0x00002070;
*(int *)EMIFB_CE0 = 0x22008800; /* CE0 CPLD 8-bit */
*(int *)EMIFB_CE1 = 0x22008800; /* CE1 Flash 8-bit */
}
[解决办法]
这个可以
[解决办法]
我最近在调试的程序也出现这种问题,正在思考,不知道你的解决没有,如果解决了,希望可以分享一下解决方案,谢谢了