Hi All,
I would like to ask a question on memory placement.
a typical linker.cmd said:
MEMORY
{
L2RAM: o = 0x10810000 l = 0x00020000
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*/
}
Usually one would be able to configure linker.cmd file so that different sections are placed into different locations of the memory (L1, L2, DDR2). However, this allocation is still rather crude in the sense that one type of content (.text, .data, etc.) as a whole is placed to one location together. If I have a rather long .text section generated from a number of C source files, but only a few functions are used frequently as ISR and the majority of other functions are used much less than the ISR function, so I would prefer to place the binary code of ISR in L1P or L2 (as long as they can hold), while keeping other .text parts in DDR2.
For example:
function_A: in L1P- function_B: in L2
- other functions: in DDR2
I believe that in order for this to be done, one must somehow "mark" function_A and function_B to differentiate them from others. But how can this be done? What are the remaining steps?
A similar questions is that instead of putting all .data content at one place, is there any way to specify, for example
- Array1: in L1D
- Array2: in L2
- Other data: in DDRs
Just like for functions, one must somehow "mark" Array1 and Array2 to differentiate them from others. But how can this be done and what are the remaining steps?
Sincerely,
Zheng