Based on pre-defined .cmd file as following
/* Memory Map 1 - the default */
MEMORY
{
vecs: o = 00000000h l = 00000200h
boot: o = 00000200h l = 00000200h
L1D: o = 00f00000h l = 00008000h
L1P: o = 00e00000h l = 00008000h
L2: o = 00800000h l = 00200000h
DDR2: o = 0e0000000h l = 010000000h
}
SECTIONS
{
.csl_vect > vecs
.text > DDR2
.stack > L2
.bss > L2
.cinit > L2
.cio > L2
.const > L2
.switch > L2
.sysmem > DDR2
.far > L2
.testMem > L2
ISRAM > L2
.image > DDR2
}
Then, in my program, I made the following allocation for several variables
#pragma DATA_SECTION(ext_buffer, ".image:tsd_input");
#pragma DATA_SECTION(center_tp, ".image:ext_sect0");
#pragma DATA_SECTION(P10_reg_tp, ".image:ext_sect1");
#pragma DATA_SECTION(N10_reg_tp, ".image:ext_sect2");
#pragma DATA_SECTION(sc_LUT, ".image:ext_sect_3");
#pragma DATA_SECTION(post_sc_image, ".image:ext_sect_4");
short ext_buffer[NUMBER_OF_SCANLINE*NUM_CHANNEL*NUM_AXIAL_SAMPLES]; 0xE01A 8978
unsigned short center_tp[NO_INPUT_SAMPLE*NO_OUTPUT_VECTOR]; 0xE000 0000
unsigned short P10_reg_tp[NO_OUTPUT_SAMPLE*NO_OUTPUT_VECTOR]; 0xE006 2000
unsigned short N10_reg_tp[NO_OUTPUT_SAMPLE*NO_OUTPUT_VECTOR]; 0xE00C 4000
unsigned char post_sc_image[NO_POSTSC_WIDTH*NO_POSTSC_HEIGHT]; 0xE012 6000
unsigned char sc_LUT[NO_BYTES_PER_LUT_ENTRY*NO_OUTPUT_PIXELS]; 0xE017 1000
In the symbol browser window, I can see the above 6 arrays have been allocated in the DDR address as I show above in red font. I am wondering, how these arrays have been allocated based on the above order? Why is ext_buffer not in the beginning of the DDR memory, but the center_tp? Can I have more control of this?
Thank you very much.