|
问题如下:用ZONE7 外扩RAM代替FLASH,如何配置CMD文件?
解答如下:给你一个我LOAD成功的,地址自己改
MEMORY { PAGE 0: /* Program Memory */ OTP : origin = 0x3D7800, length = 0x000800 /* on-chip OTP */ FLASH_IJ : origin = 0x3D8000, length = 0x004000 /* on-chip FLASH */ FLASH_GH : origin = 0x3DC000, length = 0x008000 /* on-chip FLASH */ FLASH_EF : origin = 0x3E4000, length = 0x008000 /* on-chip FLASH */ FLASH_CD : origin = 0x3EC000, length = 0x008000 /* on-chip FLASH */ FLASH_AB : origin = 0x3F4000, length = 0x003F80 /* on-chip FLASH */ CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Reserved when CSM is in use. */ BEGIN_FLASH : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to flash" bootloader mode. */ PASSWORDS : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations. */ ZONE_CODE rigin = 0xB0002, length =0x07FFE BEGIN_CODE : origin = 0x0B0000, length = 0x000002 /* Part of H0. Used for "boot to H0" bootloader mode. */ /* ZONE7 : origin = 0x3FC000, length = 0x003FC0 /* XINTF zone 7 available if MP/MCn=1 */ RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */ VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM (MP/MCn=0) or XINTF zone 7 (MP/MCn=1) */ /*片外RAM用于调试程序*/
PAGE 1 : /* Data Memory */ ZONE2 : origin = 0x080000, length = 0x030000 /* XINTF zone 2 */ ZONE_CONST : origin = 0x0B8000, length = 0x8000 /*预留了32K用于程序调试*/ }
SECTIONS { /*** Compiler Required Sections ***/ /* Program memory (PAGE 0) sections */ .text : > ZONE_CODE, PAGE = 0/*0*/ IQmath : load = ZONE_CODE, PAGE = 0/*0*/ .cinit : > RAMM0M1, PAGE = 1 .pinit : > ZONE_CODE, PAGE = 0/*0*/ .reset : > RESET, PAGE = 0, TYPE = DSECT /* We are not using the .reset section */
/* Data Memory (PAGE 1) sections */ .cio : > RAMM0M1, PAGE = 1 .bss : > RAML0L1, PAGE = 1 /* Should be empty with large memory model */ .ebss : > RAML0L1, PAGE = 1 .const : > ZONE_CONST, PAGE = 1 /* Should be empty with large memory model */ .econst : > ZONE_CONST, PAGE = 1 .stack : > RAMM0M1, PAGE = 1 .sysmem : > RAMM0M1, PAGE = 1 /* Should be empty with large memory model */ .esysmem : > RAMM0M1, PAGE = 1 .switch : > RAMM0M1, PAGE = 1
/*** User Defined Sections ***/ codestart : > BEGIN_CODE, PAGE = 0 /*0*/ /* Used by file CodeStartBranch.asm */ csm_rsvd : > CSM_RSVD, PAGE = 0, TYPE = DSECT /* Not used in RAM example */ passwords : > PASSWORDS, PAGE = 0, TYPE = DSECT /* Not used in RAM example */ }
|