avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Moving data section


From: Erik Christiansen
Subject: Re: [avr-gcc-list] Moving data section
Date: Fri, 7 Mar 2008 15:44:49 +1100
User-agent: Mutt/1.5.9i

On Mon, Mar 03, 2008 at 03:48:11PM +0900, ?????? wrote:
> 
> To solve this, I even used link script. Like following,
> 
> .mysection 0x802000: AT (LOADADDR (.text) + SIZEOF (.text))
>   {
>      PROVIDE (__begin_mysection = .) ;
>      *(.mysection)
>      PROVIDE (__end_mysection = .);
>   }  > data
> 
>   .data 0x801100: AT (LOADADDR (.mysection) + SIZEOF (.mysection))
>   {
>      PROVIDE (__data_start = .) ;
>     *(.data)
> 

No other answers yet? Hopefully this will help a little.

Your script should set the VMA to 0x801100, with the LMA remaining
abutted to the end of .mysection, apparently at 0x800100, as intended.

To diagnose, it would be helpful to see a map file, generated by ld,
during your build.

Alternatively, you could try to work around the problem, using an
additional MEMORY region. Something like:

MEMORY
{
  ...
  data      (rw!x) : ORIGIN = ..., LENGTH = ...
  extdata   (rw!x) : ORIGIN = 0x801100, LENGTH = HowMuchDoYouHave
}

SECTIONS
{
   ...

   .data : AT (LOADADDR (.mysection) + SIZEOF (.mysection))
   {
     ...
   } > extdata

This has the advantage of documenting your memory architecture
explicitly. ;-)

Erik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]