-
Linker Command File
Hi.
I am trying to allocate a certain array used by my program in external memory. My LCF file looke like this:
Code:
MEMORY
{
/* vecs + L2SRAM + CIO + STACK = size of internal memory */
vecs: o = 0x00000000, l = 0x00000200, fill = 0
L2SRAM: o = 0x00000200, l = 0x000F98E0 /*1 MB of L2SRAM (minus vecs, cio sections)*/
CIO: o = 0x000F9EE0, l = 0x00000120 /*esbn: I try this to avoid message "Invalid CIO command (5)"*/
STACK: o = 0x000FF000, l = 0x00000400
/*L2SRAM + STACK + CIO + vecs = 0xFA000 = 1024 kB*/
EXT_MEM: o = 0x80000000, l = 0x000F0000 /*I allocate 983 kB externally to read in DWTinput.*/
}
SECTIONS
{
"vectors" > vecs
.my_bufs > L2SRAM .cinit > L2SRAM
.text > L2SRAM
.stack > STACK
.bss > L2SRAM
.const > L2SRAM
.data > L2SRAM
"DataMatrix"
{
getdata.obj(.far)
} > EXT_MEM
.far > L2SRAM
.switch > L2SRAM
.sysmem > L2SRAM
.tables > L2SRAM
.cio > CIO
}
As far as I can understand I should now have the far-section of the getdata-file in EXT_MEM, but I get the following error message:
>> esbnLCF.cmd: error: system error, can't open file 'getdata.obj' for input: No such file or directory
I have checked my .map file to make sure that part of getdata.obj really is placed in the .far section.
What can I do to allocate my array in EXT_MEM?
Thank you.
Esben.
-
> As far as I can understand I should now have the far-section of the getdata-file in EXT_MEM
Did you use any pragma's / attributes in the source code to indicate that you want this array in a new section?
Also, which tools are you using, this is very specific stuff.
> >> esbnLCF.cmd: error: system error, can't open file 'getdata.obj' for input: No such file or directory
Is it in a library?
Is it on the search path?
As an experiment, does the absolute path to the file work?
What about *getdata.obj(.far)
-
Salem>
I havnt made any specifications in the source code about my memory design. It's all in the LCF file above. I am using TI.s Code Composer Studio 3.1 to develop my project.
I declared DataMatrix[] as a static global variable to make it "visible" in the map file. Therefore I know it was placed in the far section. But I wish to move it into the EXT_MEM, a section I have defined as external memory.
>Is it in a library?
No, its an ordinary source file in my program.
>Is it on the search path?
>As an experiment, does the absolute path to the file work?
What is the search path and the absolute path?
-
Absolute path would be
/path/to/getdata.obj(.far)
You could just use in the source code
#pragma DATA_SECTION(DataMatrix, ".extMatrix");
And the LCF would just be
.extMatrix > EXT_MEM