DSPRelated.com
Forums

LOAD START and UNION in cmd file

Started by nelkherj September 27, 2005
Hi,

I am trying to overlay two sets of files into the same memory
location in RAM. Basically, I want to dynamically copy them from
two separate locations in flash in to RAM. I used the UNION
directive to try and accomplish this task. I was able to get the
linker to create .text1 and .text2 in the map file where the
addresses are also in the correct locations in RAM and Flash, but I
was never able to get the linker to create the variables declared
with the LOAD_START, LOAD_SIZE, RUN_START, and RUN_SIZE directives.
The map file does not have them.

Here is a snippet of what my cmd file looks:

MEMORY
{
PAGE 0:
RAM: origin=0x000300, length=0x007000
FLASH(RIX): origin=0x500000, length=0x010000
}

SECTIONS
{
.text > FLASH PAGE 0 /* Code */

UNION: run=RAM,
LOAD_START(_textLoadStart),
LOAD_SIZE(_textLoadSize),
RUN_START(_textRunStart),
RUN_SIZE(_textRunSize),
PAGE 0
{
.text1: load=FLASH, { file1.obj(.text), file2.obj(.text) }
.text2: load=FLASH, { filea.obj(.text), fileb.obj(.text) }
}
}

As mentioned above, file1 and file2 have the same RAM addresses as
filea and fileb. But I can never get the linker to create the
variables textLoadStart, textLoadSize, textRunStart, textRunSize,
for use in the program to copy the code from Flash to RAM.

I tried to place the LOAD_START,... directives at different
locations in the file and stil no luck. Any idea what am I missing
here?

Thanks,
Nick


Hello Nick,
 
What version of CCS are you using??  This is a fairly new option.
 
mikedunn

nelkherj <n...@yahoo.com> wrote:
Hi,

I am trying to overlay two sets of files into the same memory
location in RAM. Basically, I want to dynamically copy them from
two separate locations in flash in to RAM. I used the UNION
directive to try and accomplish this task. I was able to get the
linker to create .text1 and .text2 in the map file where the
addresses are also in the correct locations in RAM and Flash, but I
was never able to get the linker to create the variables declared
with the LOAD_START, LOAD_SIZE, RUN_START, and RUN_SIZE directives.
The map file does not have them.

Here is a snippet of what my cmd file looks:

MEMORY
{
PAGE 0:
RAM: origin=0x000300, length=0x007000
FLASH(RIX): origin=0x500000, length=0x010000
}

SECTIONS
{
.text > FLASH PAGE 0 /* Code */

UNION: run=RAM,
LOAD_START(_textLoadStart),
LOAD_SIZE(_textLoadSize),
RUN_START(_textRunStart),
RUN_SIZE(_textRunSize),
PAGE 0
{
.text1: load=FLASH, { file1.obj(.text), file2.obj(.text) }
.text2: load=FLASH, { filea.obj(.text), fileb.obj(.text) }
}
}

As mentioned above, file1 and file2 have the same RAM addresses as
filea and fileb. But I can never get the linker to create the
variables textLoadStart, textLoadSize, textRunStart, textRunSize,
for use in the program to copy the code from Flash to RAM.

I tried to place the LOAD_START,... directives at different
locations in the file and stil no luck. Any idea what am I missing
here?

Thanks,
Nick<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c6x/

<*> To unsubscribe from this group, send an email to:
c...@yahoogroups.com

<*