MCU为F28069,采用Flash_to_RAM的方法,把所有程序都从FLASH移到RAM中运行,但程序运行后无法跳转到main(),不知道什么原因,是因为CMD文件有问题吗?大家帮忙看看。
MEMORY
{
PAGE 0: /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
RAML0_8 : origin = 0x008000, length = 0x00B800 /* on-chip RAM */
OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */
FLASHD_H : origin = 0x3D8000, length = 0x014000 /* on-chip FLASH */
FLASHA_C : origin = 0x3EC000, length = 0x00BF80 //origin = 0x3F0000, length = 0x007F80 /* on-chip FLASH */
{
PAGE 0: /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
RAML0_8 : origin = 0x008000, length = 0x00B800 /* on-chip RAM */
OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */
FLASHD_H : origin = 0x3D8000, length = 0x014000 /* on-chip FLASH */
FLASHA_C : origin = 0x3EC000, length = 0x00BF80 //origin = 0x3F0000, length = 0x007F80 /* on-chip FLASH */
CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
BEGIN_FLASH : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
CSM_PWL : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
ROM : origin = 0x3FC000, length = 0x003F00 /* Boot ROM */
//FPUTABLES : origin = 0x3FD590, length = 0x000600 /* FPU Tables in Boot ROM */
//IQTABLES : origin = 0x3FDC30, length = 0x000B50 /* IQ Math Tables in Boot ROM */
//IQTABLES2 : origin = 0x3FE780, length = 0x00008C /* IQ Math Tables in Boot ROM */
//IQTABLES3 : origin = 0x3FE80C, length = 0x0000AA /* IQ Math Tables in Boot ROM */
ROM : origin = 0x3FC000, length = 0x003F00 /* Boot ROM */
//FPUTABLES : origin = 0x3FD590, length = 0x000600 /* FPU Tables in Boot ROM */
//IQTABLES : origin = 0x3FDC30, length = 0x000B50 /* IQ Math Tables in Boot ROM */
//IQTABLES2 : origin = 0x3FE780, length = 0x00008C /* IQ Math Tables in Boot ROM */
//IQTABLES3 : origin = 0x3FE80C, length = 0x0000AA /* IQ Math Tables in Boot ROM */
RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM */
VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */
PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE0 for program allocation */
/* Registers remain on PAGE1 */
BOOT_RSVD : origin = 0x000000, length = 0x000050 /* Part of M0, BOOT rom will use this for stack */
RAMM01 : origin = 0x000050, length = 0x0007B0 /* on-chip RAM block M0 */
RAML8 : origin = 0x012000, length = 0x001800 /* on-chip RAM block L8. From 0x13800 to 0x14000 is reserved for InstaSPIN */
USB_RAM : origin = 0x040000, length = 0x000800 /* USB RAM */
}
RAMM01 : origin = 0x000050, length = 0x0007B0 /* on-chip RAM block M0 */
RAML8 : origin = 0x012000, length = 0x001800 /* on-chip RAM block L8. From 0x13800 to 0x14000 is reserved for InstaSPIN */
USB_RAM : origin = 0x040000, length = 0x000800 /* USB RAM */
}
/**************************************************************/
/* Link all user defined sections */
/**************************************************************/
SECTIONS
{
/* Link all user defined sections */
/**************************************************************/
SECTIONS
{
/*** Code Security Password Locations ***/
csmpasswds : > CSM_PWL, PAGE = 0 /* Used by file CSMPasswords.asm */
csm_rsvd : > CSM_RSVD, PAGE = 0 /* Used by file CSMPasswords.asm */
csmpasswds : > CSM_PWL, PAGE = 0 /* Used by file CSMPasswords.asm */
csm_rsvd : > CSM_RSVD, PAGE = 0 /* Used by file CSMPasswords.asm */
/*** User Defined Sections ***/
codestart : > BEGIN_FLASH, PAGE = 0 /* Used by file CodeStartBranch.asm */
wddisable : > FLASHA_C, PAGE = 0 /* Used by file CodeStartBranch.asm */
copysections : > FLASHA_C, PAGE = 0 /* Used by file SectionCopy.asm */
codestart : > BEGIN_FLASH, PAGE = 0 /* Used by file CodeStartBranch.asm */
wddisable : > FLASHA_C, PAGE = 0 /* Used by file CodeStartBranch.asm */
copysections : > FLASHA_C, PAGE = 0 /* Used by file SectionCopy.asm */
.reset : > RESET, PAGE = 0, TYPE = DSECT
vectors : > VECTORS, PAGE = 0, TYPE = DSECT
/*** Uninitialized Sections ***/
/* Allocate uninitalized data sections: */
.stack : > RAMM01, PAGE = 1
.ebss : > RAML8, PAGE = 1
.esysmem : > RAML8, PAGE = 1
/* Allocate uninitalized data sections: */
.stack : > RAMM01, PAGE = 1
.ebss : > RAML8, PAGE = 1
.esysmem : > RAML8, PAGE = 1
IQmath : > FLASHA_C, PAGE = 0 /* Math Code */
//IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
/*** Initialized Sections ***/
.cinit : LOAD = FLASHA_C, PAGE = 0 /* Load section to Flash */
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_cinit_loadstart),
RUN_START(_cinit_runstart),
SIZE(_cinit_size)
//IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
/*** Initialized Sections ***/
.cinit : LOAD = FLASHA_C, PAGE = 0 /* Load section to Flash */
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_cinit_loadstart),
RUN_START(_cinit_runstart),
SIZE(_cinit_size)
.const : LOAD = FLASHA_C, PAGE = 0 /* Load section to Flash */
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_const_loadstart),
RUN_START(_const_runstart),
SIZE(_const_size)
.econst : LOAD = FLASHA_C, PAGE = 0 /* Load section to Flash */
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_econst_loadstart),
RUN_START(_econst_runstart),
SIZE(_econst_size)
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_const_loadstart),
RUN_START(_const_runstart),
SIZE(_const_size)
.econst : LOAD = FLASHA_C, PAGE = 0 /* Load section to Flash */
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_econst_loadstart),
RUN_START(_econst_runstart),
SIZE(_econst_size)
.pinit : LOAD = FLASHA_C, PAGE = 0 /* Load section to Flash */
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_pinit_loadstart),
RUN_START(_pinit_runstart),
SIZE(_pinit_size)
.switch : LOAD = FLASHA_C, PAGE = 0 /* Load section to Flash */
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_switch_loadstart),
RUN_START(_switch_runstart),
SIZE(_switch_size)
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_switch_loadstart),
RUN_START(_switch_runstart),
SIZE(_switch_size)
.text : LOAD = FLASHA_C, PAGE = 0 /* Load section to Flash */
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_text_loadstart),
RUN_START(_text_runstart),
SIZE(_text_size)
RUN = RAML0_8, PAGE = 0 /* Run section from RAM */
LOAD_START(_text_loadstart),
RUN_START(_text_runstart),
SIZE(_text_size)
}
/******************* end of file ************************/