MEMORY
{
PAGE 0 :
/* For this example, L0 is split between PAGE 0 and PAGE 1 */
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x000050, length = 0x0003B0
PRAML0 : origin = 0x008000, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
IQTABLES : origin = 0x3FE000, length = 0x000B50 /* IQ Math Tables in Boot ROM */
IQTABLES2 : origin = 0x3FEB50, length = 0x00008C /* IQ Math Tables in Boot ROM */
IQTABLES3 : origin = 0x3FEBDC, length = 0x0000AA /* IQ Math Tables in Boot ROM */
BOOTROM : origin = 0x3FF27C, length = 0x000D44
PAGE 1 :
/* For this example, L0 is split between PAGE 0 and PAGE 1 */
RAMM1 : origin = 0x000480, length = 0x000380 /* on-chip RAM block M1 */
DRAML0 : origin = 0x008800, length = 0x000800
}
SECTIONS
{
/* Setup for "boot to SARAM" mode:
The codestart section (found in DSP28_CodeStartBranch.asm)
re-directs execution to the start of user code. */
codestart : > BEGIN, PAGE = 0
ramfuncs : > RAMM0 PAGE = 0
.text : > PRAML0, PAGE = 0
.cinit : > RAMM0, PAGE = 0
.pinit : > RAMM0, PAGE = 0
.switch : > RAMM0, PAGE = 0
.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */
OnRestart(int nErrorCode)
{
/* CCS will call OnRestart() when you do a Debug->Restart and */
/* after you load a new file. Between running interrupt based */
/* programs, this function will clear interrupts and help keep */
/* the processor from going off into invalid memory. */
C28x_Mode();
IER = 0;
IFR = 0;
}
OnPreFileLoaded()
{
}
OnFileLoaded(int nErrorCode, int bSymbolsOnly)
{
}
OnTargetConnect()
{
C28x_Mode();
F28027_Memory_Map(); /* Initialize the CCS memory map */
/* Check to see if CCS has been started-up with the DSP already */
/* running in real-time mode. The user can add whatever */
/* custom initialization stuff they want to each case. */
if (GEL_IsInRealtimeMode()) /* Do real-time mode target initialization */
{
// Note: This case never executes with the simulator
}
else /* Do stop-mode target initialization */
{
// Note: This case never executes with the simulator
}
}
hotmenu F28027_Memory_Map()
{
/* Initialize M0M1MAP and VMAP input signals high */
M0M1MAP_IN = 1; /* Maps M0 and M1 to same Prog/Data addr */
VMAP_IN = 1; /* Vectors fetched from 0x3fffc0-0x3fffff */
GEL_MapReset();
GEL_MapOn();
/* The OTP, FLASH/ROM, and BOOT ROM memory maps are defined as */
/* writeable by GEL_MapAdd so that the debugger can load code */
/* into them. The simulator configuration file defines these */
/* memory blocks as flash or ROM which prevents the application */
/* from writing to them. */
谢谢斑竹回复,
是这样子,看到视频中讲解软件仿真,所以试了一下,但是没有成功,CMD文件用的是RAM调试时的CMD文件,如下:
MEMORY
{
PAGE 0 :
/* For this example, L0 is split between PAGE 0 and PAGE 1 */
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x000050, length = 0x0003B0
PRAML0 : origin = 0x008000, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
IQTABLES : origin = 0x3FE000, length = 0x000B50 /* IQ Math Tables in Boot ROM */
IQTABLES2 : origin = 0x3FEB50, length = 0x00008C /* IQ Math Tables in Boot ROM */
IQTABLES3 : origin = 0x3FEBDC, length = 0x0000AA /* IQ Math Tables in Boot ROM */
BOOTROM : origin = 0x3FF27C, length = 0x000D44
PAGE 1 :
/* For this example, L0 is split between PAGE 0 and PAGE 1 */
RAMM1 : origin = 0x000480, length = 0x000380 /* on-chip RAM block M1 */
DRAML0 : origin = 0x008800, length = 0x000800
}
SECTIONS
{
/* Setup for "boot to SARAM" mode:
The codestart section (found in DSP28_CodeStartBranch.asm)
re-directs execution to the start of user code. */
codestart : > BEGIN, PAGE = 0
ramfuncs : > RAMM0 PAGE = 0
.text : > PRAML0, PAGE = 0
.cinit : > RAMM0, PAGE = 0
.pinit : > RAMM0, PAGE = 0
.switch : > RAMM0, PAGE = 0
.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */
.stack : > RAMM1, PAGE = 1
.ebss : > RAMM1, PAGE = 1
.econst : > DRAML0, PAGE = 1
.esysmem : > RAMM1, PAGE = 1
IQmath : > PRAML0, PAGE = 0
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
MEMORY MAP中设置如下:
麻烦帮忙看看可否解决。
看了 CMD中不存在这个地址
你在看看.gel文件中有没有
sim28027.GEL文件如下,斑竹大大,怎样修改呀:
StartUp()
{
}
OnReset(int nErrorCode)
{
C28x_Mode();
}
OnRestart(int nErrorCode)
{
/* CCS will call OnRestart() when you do a Debug->Restart and */
/* after you load a new file. Between running interrupt based */
/* programs, this function will clear interrupts and help keep */
/* the processor from going off into invalid memory. */
C28x_Mode();
IER = 0;
IFR = 0;
}
OnPreFileLoaded()
{
}
OnFileLoaded(int nErrorCode, int bSymbolsOnly)
{
}
OnTargetConnect()
{
C28x_Mode();
F28027_Memory_Map(); /* Initialize the CCS memory map */
/* Check to see if CCS has been started-up with the DSP already */
/* running in real-time mode. The user can add whatever */
/* custom initialization stuff they want to each case. */
if (GEL_IsInRealtimeMode()) /* Do real-time mode target initialization */
{
// Note: This case never executes with the simulator
}
else /* Do stop-mode target initialization */
{
// Note: This case never executes with the simulator
}
}
/********************************************************************/
/* F28027 Memory Map */
/* */
/* Note: M0M1MAP and VMAP signals tied high on '28027 core */
/* */
/* 0x000000 - 0x0003ff M0 SARAM (Prog and Data) */
/* 0x000400 - 0x0007ff M1 SARAM (Prog and Data) */
/* 0x000800 - 0x001fff Peripheral Frame0 (PF0) (Data only) */
/* 0x005000 - 0x005fff Peripheral Frame3 (PF3) (Data only) */
/* 0x006000 - 0x006fff Peripheral Frame1 (PF1) (Data only) */
/* 0x007000 - 0x007fff Peripheral Frame2 (PF2) (Data only) */
/* 0x008000 - 0x008fff L0 SARAM (Prog and Data) */
/* 0x3d7800 - 0x3d7fff OTP (Prog and Data) */
/* 0x3d7c80 - 0x3d7cbf Device Cal (TI OTP) (Prog and Data) */
/* 0x3d7cc0 - 0x3d7cff Boot Get Mode (TI OTP) (Prog and Data) */
/* 0x3d7fff - 0x3d7fff PARTID value (Prog and Data) */
/* 0x3f0000 - 0x3f7fff FLASH (Prog and Data) */
/* 0x3f8000 - 0x3f8fff L0 SARAM Mirror (Prog and Data) */
/* 0x3fe000 - 0x3fffff BOOT ROM (Prog and Data) */
/********************************************************************/
menuitem "Initialize Memory Map";
hotmenu F28027_Memory_Map()
{
/* Initialize M0M1MAP and VMAP input signals high */
M0M1MAP_IN = 1; /* Maps M0 and M1 to same Prog/Data addr */
VMAP_IN = 1; /* Vectors fetched from 0x3fffc0-0x3fffff */
GEL_MapReset();
GEL_MapOn();
/* The OTP, FLASH/ROM, and BOOT ROM memory maps are defined as */
/* writeable by GEL_MapAdd so that the debugger can load code */
/* into them. The simulator configuration file defines these */
/* memory blocks as flash or ROM which prevents the application */
/* from writing to them. */
/* Program memory maps */
GEL_MapAdd(0x0,0,0x400,1,1); /* M0 SARAM */
GEL_MapAdd(0x400,0,0x400,1,1); /* M1 SARAM */
GEL_MapAdd(0x8000,0,0x1000,1,1); /* L0 SARAM */
GEL_MapAdd(0x3d7800,0,0x400,1,1); /* OTP */
GEL_MapAdd(0x3d7c80,0,0x040,1,1); /* Device Cal */
GEL_MapAdd(0x3d7cc0,0,0x040,1,1); /* Boot Get Mode */
GEL_MapAdd(0x3d7fff,0,0x001,1,1); /* PARTID value */
GEL_MapAdd(0x3f0000,0,0x8000,1,1); /* FLASH */
GEL_MapAdd(0x3f8000,0,0x1000,1,1); /* L0 SARAM Mirror */
GEL_MapAdd(0x3fe000,0,0x2000,1,1); /* BOOT ROM */
/* Data memory maps */
GEL_MapAdd(0x0,1,0x400,1,1); /* M0 SARAM */
GEL_MapAdd(0x400,1,0x400,1,1); /* M1 SARAM */
GEL_MapAdd(0x800,1,0x1800,1,1); /* PF0 */
GEL_MapAdd(0x5000,1,0x1000,1,1); /* PF3 */
GEL_MapAdd(0x6000,1,0x1000,1,1); /* PF1 */
GEL_MapAddStr(0x7000,1,0x1000,"R|W|AS2",0); /* PF2 */
GEL_MapAdd(0x8000,1,0x1000,1,1); /* L0 SARAM */
GEL_MapAdd(0x3d7800,1,0x800,1,1); /* OTP */
GEL_MapAdd(0x3d7c80,1,0x040,1,1); /* Device Cal */
GEL_MapAdd(0x3d7cc0,1,0x040,1,1); /* Boot Get Mode */
GEL_MapAdd(0x3d7fff,1,0x001,1,1); /* PARTID value */
GEL_MapAdd(0x3f0000,1,0x8000,1,1); /* FLASH */
GEL_MapAdd(0x3f8000,1,0x1000,1,1); /* L0 SARAM Mirror */
GEL_MapAdd(0x3fe000,1,0x2000,1,1); /* BOOT ROM */
}
/********************************************************************/
menuitem "Addressing Modes";
hotmenu C28x_Mode()
{
ST1 = ST1 & (~0x0100); /* AMODE = 0 */
ST1 = ST1 | 0x0200; /* OBJMODE = 1 */
}
hotmenu C24x_Mode()
{
ST1 = ST1 | 0x0100; /* AMODE = 1 */
ST1 = ST1 | 0x0200; /* OBJMODE = 1 */
}
hotmenu C27x_Mode()
{
ST1 = ST1 & (~0x0100); /* AMODE = 0 */
ST1 = ST1 & (~0x0200); /* OBJMODE = 0 */
}
感觉没什么错误啊 帮不了你啦 不好意思
一周热门 更多>