EmbeddedRelated.com
Forums

CodeWarrio error L1121

Started by rebeschini2004 June 22, 2007
Good morning,

I use CodeWarrior version 3.1 for HC12 - microcontrolador MC9S12DJ64

When compiling gives the error:

Link Error : L1121: Out of allocation space at address 0x803B
for .copy section
Link Error : Link failed

I already did what is in Codewarior helps, that it is to change the
position of the memory of the file .copy, but it didn't work...

Does anybody know him what happens?

Eng. Daniel
Hello,
Hard to tell from remote.
If the linker should have generated a map file at this stage, I would
consult it what could cause the overflow.
Otherwise go to the linker .prm file and artificially extend the memory
block aroun 0x803B so you can link, and then check the map file too.
Maybe you have a large object which needs to be copied to RAM (like an
array in RAM with initialisation values)?

Erich

-----Original Message-----
From: 6... [mailto:6...] On Behalf
Of rebeschini2004
Sent: Friday, June 22, 2007 4:37 PM
To: 6...
Subject: [68HC12] CodeWarrio error L1121
Good morning,

I use CodeWarrior version 3.1 for HC12 - microcontrolador MC9S12DJ64

When compiling gives the error:

Link Error : L1121: Out of allocation space at address 0x803B
for .copy section
Link Error : Link failed

I already did what is in Codewarior helps, that it is to change the
position of the memory of the file .copy, but it didn't work...

Does anybody know him what happens?

Eng. Daniel

Yahoo! Groups Links
As there are 2 pages accessible in the 0x8000..0xBFFF window I wonder if
the use of the
0x803B address (and not 0x3D803B) does mean that you are only using the
48k flash visible without paging. Well anyway, that's not the issue here.

I know that previous versions of the linker had the limitation that the
.copy section had to be placed into a single contiguous placement.
They started at the current allocation location and when not all of
.copy did fit into the same area, L1121 was issued.
Here's the snippet out of the Release_Notes\HC12\Notes_Linker.txt about
this issue.
>- MTWX16537: Failure to allocate .copy if there was not enough space
in the current segment for .copy, but another segment afterwards does
contain enough space.
> Previous versions of the linker did not support to switch the segment
for the .copy section. This version does now support this.

Anyway, to fix this issue and with the assumption you actually have
enough flash space, place the .copy section into its own PLACEMENT line
and only list a single
segment on that line.

Say if you have something like this:
WhatEverElse,
COPY INTO ROM_8000__TO_8020, ROM_C000;
...

change this into
WhatEverElse INTO ROM_8000__TO_8020, ROM_C000;
...
COPY INTO ROM_C000;

PC: Of course the issue could also be that you do simply run out of
memory...

Daniel (yes, same name :-)

Styger Erich-R7AAKG wrote:
> Hello,
> Hard to tell from remote.
> If the linker should have generated a map file at this stage, I would
> consult it what could cause the overflow.
> Otherwise go to the linker .prm file and artificially extend the memory
> block aroun 0x803B so you can link, and then check the map file too.
> Maybe you have a large object which needs to be copied to RAM (like an
> array in RAM with initialisation values)?
>
> Erich
>
> -----Original Message-----
> From: 6... [mailto:6...] On Behalf
> Of rebeschini2004
> Sent: Friday, June 22, 2007 4:37 PM
> To: 6...
> Subject: [68HC12] CodeWarrio error L1121
> Good morning,
>
> I use CodeWarrior version 3.1 for HC12 - microcontrolador MC9S12DJ64
>
> When compiling gives the error:
>
> Link Error : L1121: Out of allocation space at address 0x803B
> for .copy section
> Link Error : Link failed
>
> I already did what is in Codewarior helps, that it is to change the
> position of the memory of the file .copy, but it didn't work...
>
> Does anybody know him what happens?
>
> Eng. Daniel
>
>
> Yahoo! Groups Links
>
>
> Yahoo! Groups Links
>
>