This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28335 FLASH全部搬移到ram中运行出现的问题

程序很短,把flash的程序全部搬移到ram中运行。

.stack : > RAMM0 PAGE = 1
.ebss : > RAML4L5L6L7 PAGE = 1
.esysmem : > RAMM1 PAGE = 1

.text : LOAD = FLASHA, PAGE = 0  
RUN = RAM_L0L1L2L3, PAGE = 0
LOAD_START(_text_loadstart),
RUN_START(_text_runstart),
SIZE(_text_size)

上面这个RAM_L0L1L2L3是程序空间,定义成 : origin = 0x008000, length = 0x006000

RAML4L5L6L7 是数据空间定义成      : origin = 0x00E000, length = 0x002000

现在发现这个程序烧写在部分板子中是能正常运行的(观察中断 toggle的呼吸灯),但是有些板子中,上电后怎么都不能正常运行(呼吸灯不闪),连上仿真器能看到是进了illegal_isr了,有些板子用硬件狗TPS3828-33DBVT复位多次后,程序又能正常运行了,开始以为是硬件电路的问题。

但是我更改上面程序空间和数据空间的分配后,不能正常的板子也可以一上电就能跑起来,但是另一些本来好着的板子又不能运行了,这样感觉好像是cmd的问题,我查看map,.txt 等分配都是没有超范围的。请专家帮我分析分析,万分感激!


MEMORY
{
PAGE 0: /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */


RAM_L0L1L2L3: origin = 0x008000, length = 0x006000 /* on-chip RAM */
OTP : origin = 0x380400, length = 0x000400 /* on-chip OTP */
FLASHH : origin = 0x300000, length = 0x008000 /* on-chip FLASH */
FLASHG : origin = 0x308000, length = 0x008000 /* on-chip FLASH */
FLASHF : origin = 0x310000, length = 0x008000 /* on-chip FLASH */
FLASHE : origin = 0x318000, length = 0x008000 /* on-chip FLASH */
FLASHD : origin = 0x320000, length = 0x008000 /* on-chip FLASH */
FLASHC : origin = 0x328000, length = 0x008000 /* on-chip FLASH */
FLASHA : origin = 0x338000, length = 0x007F80 /* on-chip FLASH */
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
BEGIN_FLASH : origin = 0x33FFF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
ADC_CAL : origin = 0x380080, length = 0x000009 /* Part of TI OTP */
IQTABLES : origin = 0x3FE000, length = 0x000b50 /* IQ Math Tables in Boot ROM */
IQTABLES2 : origin = 0x3FEB50, length = 0x00008c /* IQ Math Tables in Boot ROM */
FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0 /* FPU Tables in Boot ROM */
ROM : origin = 0x3FF27C, length = 0x000D44 /* Boot ROM */
RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM */
VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */


PAGE 1 : /* Data Memory */
*/

RAMM0 : origin = 0x000000, length = 0x000400 /* on-chip RAM block M0 */
BOOT_RSVD : origin = 0x000400, length = 0x000080 /* Part of M1, BOOT rom will use this for stack */
RAMM1 : origin = 0x000480, length = 0x000380 /* on-chip RAM block M1 */
RAML4L5L6L7 : origin = 0x00E000, length = 0x002000 /* on-chip RAM block L4 */
ZONE0A : origin = 0x004000, length = 0x000020 /*DSP1读取与ram的中FPGA所放数的地址,32个数*/
ZONE0B : origin = 0x004020, length = 0x0000E0 /*DSP1写FPGA_RAM的地址,128个数*/
ZONE0C : origin = 0x004100, length = 0x000F00 /*zone0剩余的位置*/
ZONE6A : origin = 0x100000, length = 0x0000A0 /*zone6未使用的位置*/
ZONE6 : origin = 0x1000A0, length = 0x0000E0 /*DSP1通过FPGA的片内RAM读取DSP2的地址,128个数*/
ZONE6B : origin = 0x100180, length = 0x0FFE80 /*zone6未使用的位置*/
ZONE7 : origin = 0x0200000, length = 0x010000 /* XINTF zone 7 - data space */

FLASHB : origin = 0x330000, length = 0x008000 /* on-chip FLASH */
}


SECTIONS
{

/*** Code Security Password Locations ***/
csmpasswds : > CSM_PWL PAGE = 0
csm_rsvd : > CSM_RSVD PAGE = 0

/*** User Defined Sections ***/
codestart : > BEGIN_FLASH, PAGE = 0 /* Used by file CodeStartBranch.asm */
wddisable : > FLASHA, PAGE = 0
copysections : > FLASHA, PAGE = 0

/* Allocate IQ math areas: */
IQmath : > FLASHC PAGE = 0 /* Math Code */
IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD
IQmathTables2 : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD

/* Allocate DMA-accessible RAM sections: */


XRAM_RD_FPGA : > ZONE0A, PAGE = 1
XRAM_WR : > ZONE0B, PAGE = 1
XRAM_RD_DSP : > ZONE6, PAGE = 1


.adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD

.reset : > RESET, PAGE = 0, TYPE = DSECT
vectors : > VECTORS PAGE = 0, TYPE = DSECT

/*** Uninitialized Sections ***/
.stack : > RAMM0 PAGE = 1
.ebss : > RAML4L5L6L7 PAGE = 1
.esysmem : > RAMM1 PAGE = 1

/*** Initialized Sections ***/
.cinit : LOAD = FLASHA, PAGE = 0 /* can be ROM */
RUN = RAM_L0L1L2L3, PAGE = 0 /* must be CSM secured RAM */
LOAD_START(_cinit_loadstart),
RUN_START(_cinit_runstart),
SIZE(_cinit_size)

.const : LOAD = FLASHA, PAGE = 0 /* can be ROM */
RUN = RAM_L0L1L2L3, PAGE = 0 /* must be CSM secured RAM */
LOAD_START(_const_loadstart),
RUN_START(_const_runstart),
SIZE(_const_size)

.econst : LOAD = FLASHA, PAGE = 0 /* can be ROM */
RUN = RAM_L0L1L2L3, PAGE = 0 /* must be CSM secured RAM */
LOAD_START(_econst_loadstart),
RUN_START(_econst_runstart),
SIZE(_econst_size)

.pinit : LOAD = FLASHA, PAGE = 0 /* can be ROM */
RUN = RAM_L0L1L2L3, PAGE = 0 /* must be CSM secured RAM */
LOAD_START(_pinit_loadstart),
RUN_START(_pinit_runstart),
SIZE(_pinit_size)

.switch : LOAD = FLASHA, PAGE = 0 /* can be ROM */
RUN = RAM_L0L1L2L3, PAGE = 0 /* must be CSM secured RAM */
LOAD_START(_switch_loadstart),
RUN_START(_switch_runstart),
SIZE(_switch_size)

.text : LOAD = FLASHA, PAGE = 0 /* can be ROM */
RUN = RAM_L0L1L2L3, PAGE = 0 /* must be CSM secured RAM */
LOAD_START(_text_loadstart),
RUN_START(_text_runstart),
SIZE(_text_size)
}