Hi,
I would like to ask one question on L1D (DM6437).
I have added the following command in linker.cmd:
MEMORY
{
L2RAM: o = 0x10800000 l = 0x00020000
L1DRAM: o = 0x10f04000 l = 0x0000c000
DDR2: o = 0x80000000 l = 0x2000000
}
SECTIONS
{
vectors > 0x80000000, RUN_START(_ISTP_START)
.bss > DDR2
.cinit > DDR2
.cio > DDR2
.const > DDR2
.data > DDR2
.far > DDR2
.stack > DDR2
.switch > DDR2
.sysmem > DDR2
.text > DDR2
/* .ddr2 > DDR2*/
my_sect1 > L1DRAM
}
in order to put my_sect1, specified using #pragma DATA_SECTION, into L1DRAM.
But after checking .map file, it appears that
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
L2RAM 10800000 00020000 00002024 0001dfdc RWIX
L1DRAM 10f04000 0000c000 00000000 0000c000 RWIX
DDR2 80000000 02000000 0004d242 01fb2dbe RWIX
L1DRAM was not used at all.
I am wondering why this happen.First, cache might need to be explicitly enabled with code, but does L1DRAM have the need? If it does, the it must be enabled after the code starts running, which then means Linker would have no chance to load data into L1D, which results in a contradiction. So it seems to me that after booting, L1DRAM should be automatically enabled.
If L1DRAM is automatically enabled after booting, why the code above doesn't work? Why linker cannot load data into L1DRAM?
Thanks,
Zheng