Hi,
I complete two boots process in my system, first boot the ddr init program,second boot my real app program. And in the ddr init program all cmd sections are defined in L2 memory, they work well ,there is no problem.
Then in my real app program, the sections are define in L2 or DDR, and i found that where several sections defined seriously affect the program work result. They are .const/.cinit/.switch sections, when i define any one
of them in the DDR,my app program can not work normally.when i put all the three sections in L2, app program canwork well.
My question is why this happens?
My final cmd is as below
-heap 0x4000000 /* 64MB */
-stack 0x4000 /* 16KB */
MEMORY
{
LOCAL_L2_SRAM: o = 0x00800000 l = 0x00100000 /* 1MB LOCAL L2 SRAM */
LOCAL_L1P_SRAM: o = 0x00E00000 l = 0x00008000 /* 32kB LOCAL L1P SRAM */
LOCAL_L1D_SRAM: o = 0x00F00000 l = 0x00008000 /* 32kB LOCAL L1D SRAM */
MSMSRAM: o = 0x0C000000 l = 0x00100000 /* 1MB Multicore shared Memmory */
CORE0_L2_SRAM_STACK: o = 0x10800000 l = 0x00004000 /* 1024kB CORE0 L2/SRAM */
CORE0_L2_SRAM: o = 0x10804000 l = 0x000FBFFC /* 1024kB CORE0 L2/SRAM ,last four bytes reserved for magic address*/
CORE0_L1P_SRAM: o = 0x10E00000 l = 0x00008000 /* 32kB CORE0 L1P/SRAM */
CORE0_L1D_SRAM: o = 0x10F00000 l = 0x00008000 /* 32kB L1D/SRAM */
EMIF16_CE0: o = 0x70000000 l = 0x04000000 /* 64MB EMIF16 CE0 Data Memory */
EMIF16_CE1: o = 0x74000000 l = 0x04000000 /* 64MB EMIF16 CE1 Data Memory */
EMIF16_CE2: o = 0x78000000 l = 0x04000000 /* 64MB EMIF16 CE2 Data Memory */
EMIF16_CE3: o = 0x7C000000 l = 0x04000000 /* 64MB EMIF16 CE3 Data Memory */
/*DDR3: o = 0x80000000 l = 0x40000000*/ /* 1GB DDR3 */
DDR3_GENERAL: o = 0x80000000 l = 0x3BEF6800 /* 1GB - 2KB*19 - 1MB DDR3 */
DDR3_COMM: o = 0xBBEF6800 l = 0x9800 /* 2KB*19 = 38KB */
DDR3_SCF: o = 0xBBF00000 l = 0xFF000 /* 大小1M-4K */
DDR3_HANDSHAKE: o = 0xBBFFF000 l = 0x0400 /* 大小1K */
DDR3_ERR_INFO: o = 0xBBFFF400 l = 0x0C00 /* 大小3K */
DDR3_HEAP: o = 0xBC000000 l = 0x4000000 /* 大小64MB */
}
SECTIONS
{
.text > CORE0_L2_SRAM
.stack > CORE0_L2_SRAM_STACK
.bss > CORE0_L2_SRAM
.cio > CORE0_L2_SRAM
.const > CORE0_L2_SRAM
.data > CORE0_L2_SRAM
.switch > CORE0_L2_SRAM
.sysmem > DDR3_HEAP
.far > CORE0_L2_SRAM
.args > CORE0_L2_SRAM
.ppinfo > CORE0_L2_SRAM
.ppdata > CORE0_L2_SRAM
.l2_int > DDR3_GENERAL
.vects > DDR3_GENERAL
/* COFF sections */
.pinit > DDR3_GENERAL
.cinit > CORE0_L2_SRAM
/* EABI sections */
.binit > DDR3_GENERAL
.init_array > DDR3_GENERAL
.neardata > CORE0_L2_SRAM
.fardata > CORE0_L2_SRAM
.rodata > CORE0_L2_SRAM
.c6xabi.exidx > CORE0_L2_SRAM
.c6xabi.extab > CORE0_L2_SRAM
.csl_vect > CORE0_L2_SRAM /* csl vect code */
.rtdata > CORE0_L2_SRAM
.rtcode > CORE0_L2_SRAM
.nrtdata > DDR3_GENERAL
.nrtcode > DDR3_GENERAL
}