想将Sun_Emif_Init()这个函数加载到CE3_SDRAM,然后在IRAM里运行,写了下面的两段程序,可为什么一运行就在Sun_Emif_Init()函数的第一行停了?想实现这个应该怎么写?
---------------------------------------------------------------------------------------------
SECTIONS
{
Emif_Init: {} load > CE3_SDRAM,
run > IRAM,
RUN_START(_Emif_Init_runstart),
LOAD_START(_Emif_Init_loadstart),
LOAD_END(_Emif_Init_loadend)
.text: {} > IRAM
.switch: {} > IRAM
.cinit: {} > IRAM
.pinit: {} > IRAM
.const: {} > IRAM
.stack > IRAM
.sysmem > IRAM
.csldata > IRAM
.bss: {} > IRAM
.far: {} > IRAM
.data: {} > IRAM
.cio: {} > IRAM
}
-----------------------------------------------------------------------------------------------------
extern unsigned int Emif_Init_runstart;
extern unsigned int Emif_Init_loadstart;
extern unsigned int Emif_Init_loadend;
#pragma CODE_SECTION(Sun_Emif_Init,"Emif_Init")
void Sun_Emif_Init()
{
//两种初始方式,一种如MyEMIFcfg0用宏语言,一种如MyEMIFcfg1直接赋值
EMIF_Config MyEMIFcfg1 = {
0x00003068, /* Global Control Reg. (GBLCTL) */
0x22920712, /* CE0 Space Control Reg. (CECTL0) setup 2, Wstrobe 10, Rstrobe 7,hold 2 */
0x513a8502, /* CE1 Space Control Reg. (CECTL1) */
0x10510191, /* CE2 Space Control Reg. (CECTL2) */
0x10510191, /* CE3 Space Control Reg. (CECTL3) */
0x6b227000, /* SDRAM Control Reg.(SDCTL) */
0x00000300, /* SDRAM Timing Reg.(SDTIM) */
0x00000128 /* SDRAM Extended Reg.(SDEXT) */
};
EMIF_config(&MyEMIFcfg1);
}
-------------------------------------------------------------------------------------------------------------
|