Hi,
I have defined my memory mapping for C6455 as follows in the .cmd file,
MEMORY
{
L2RAM: o = 0x00800000 l = 0x000FFFFF /* 2MB L2 Internal SRAM */
L2DRAM: o = 0x00900000 l = 0x000FFFFF
L1PRAM: o = 0x00E00000 l = 0x00008000 /* 32kB L1 Program SRAM/CACHE */
L1DRAM: o = 0x00F00000 l = 0x00008000 /* 32kB L1 Data SRAM/CACHE */
EMIFA_CE2: o = 0xA0000000 l = 0x00800000 /* 8MB EMIFA CE2 */
EMIFA_CE3: o = 0xB0000000 l = 0x00800000 /* 8MB EMIFA CE2 */
EMIFA_CE4: o = 0xC0000000 l = 0x00800000 /* 8MB EMIFA CE2 */
EMIFA_CE5: o = 0xD0000000 l = 0x00800000 /* 8MB EMIFA CE2 */
DDR2_BANK1: o = 0xE0000000 l = 0x007FFFFF
DDR2_BANK2: o = 0xE0800000 l = 0x007FFFFF
DDR2_BANK3: o = 0xE1000000 l = 0x007FFFFF
DDR2_BANK4: o = 0xE1800000 l = 0x007FFFFF
}
then I have created sections for the memory as follows,
SECTIONS
{
.text > L2RAM
.stack > L2RAM
.bss > L2RAM
.cio > L2RAM
.const > L2RAM
.data > L2RAM
.switch > L2RAM
.sysmem > L2RAM
.far > L2RAM
.args > L2RAM
.ppinfo > L2RAM
.ppdata > L2RAM
L2_sram > L2RAM
L2_sram_data > L2DRAM
L1_code > L1PRAM
L1_data > L1DRAM
sdram_bank1 > DDR2_BANK1
sdram_bank2 > DDR2_BANK2
sdram_bank3 > DDR2_BANK3
sdram_bank4 > DDR2_BANK4
/* COFF sections */
.pinit > L2RAM
.cinit > L2RAM
/* EABI sections */
.binit > L2RAM
.init_array > L2RAM
.neardata > L2RAM
.fardata > L2RAM
.rodata > L2RAM
.c6xabi.exidx > L2RAM
.c6xabi.extab > L2RAM
}
Example of variable declaration in .c file:
#pragma DATA_SECTION (g_Var1,"L1_data") (Placing the variable in L1_data section (i.e.) into L1 Data memory)
int g_Var1=0;
Problem:: The mapping and section definitions are fine, and the variables declared are placed into appropriate memory locations. But after compiling and loading the project on the DSK6455, the code execution is undetermined. Means to say that the functions written are not executed as expected.
Note: We are using "far" memory model.
Kindly suggest us if there are any project options to be changed. If so, then what are the changes?