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

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

Re: [avr-gcc-list] External SRAM - change bss section?


From: Matthias G?ppner
Subject: Re: [avr-gcc-list] External SRAM - change bss section?
Date: Tue, 20 Feb 2001 20:05:50 +0100

Hello Jochen,

with the following description the linker uses the external SRAM and also does
the organization for you:

 copy the "avr85xx.x "-linker script from the ldscripts directory in your
avr-gcc path. Then you can modify the MEMORY section in the linker script:

MEMORY
{
  text   (rx)   : ORIGIN = 0,    LENGTH = 8K
  data   (rw!x) : ORIGIN = 0x60, LENGTH = 8K
  eeprom (rw!x) : ORIGIN = 0,    LENGTH = 512
}

This example extends the data section to 8KByte SRAM.

Then you must tell the linker to use this linker script with option 

-Wl,--script,avr85xx.x

Also you have to enable the SRAM with a command in your
program by setting the SRE bit in the MCUCR register.

Hope I could help
Matthias


Am Die, 20 Feb 2001 schrieben Sie:
> Hello,
> 
> how can I convince the compiler (or linker) that I have external 
> SRAM connected to my  4414 or 8515 ?
> 
> The problem is that I want to use a large array as global variable, 
> but the linker says that the bss section is to small.
> The compiler switch "-minit-stack" doesn't work of course, since it
> doesn't change the bss section. There is also a switch "-Tbss" for 
> the linker, but it changes the starting address for bss. What I want
> is to change the end address of bss!
>  
> 
> For example this little (and useless) program won't compile:
> 
>   int array[500];
> 
>   int main()
>   {
>     return 0;
>   }
> 
> 
> Any hint how it can be done?
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
--
TSP - Teleprocessing Systems & Products mbH 
Matthias Goeppner       address@hidden
Altenreuth 5            95326 Kulmbach - Germany
phone: +49 9221 804253  fax  : +49 9221 8219015



reply via email to

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