[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Storing variables in external memory - suggestions
From: |
Dave Hylands |
Subject: |
Re: [avr-gcc-list] Storing variables in external memory - suggestions |
Date: |
Sat, 23 May 2009 09:14:32 -0700 |
Hi Nayani,
Replying to the list this time as well.
On Sat, May 23, 2009 at 3:24 AM, Parthasaradhi Nayani
<address@hidden> wrote:
...snip...
> Hello David Kelly,
> I tried as you mentioned and seems to work fine. One more question is, how to
> know the address ranges used by WinAVR? so one can use the unused ranges for
> external EEPROM, FLASH etc. Thank you.
I'm not David Kelly, but I know the answer...
They're in the linker script.
The simplest way is to the following from the command line:
avr-gcc -mmcu=atmega8 -Wl,--verbose
Replace the atmega8 with the particular chip you're interested in.
The output of this will contain the following near the top:
MEMORY
{
text (rx) : ORIGIN = 0, LENGTH = 8K
data (rw!x) : ORIGIN = 0x800060, LENGTH = 0xffa0
eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 64K
fuse (rw!x) : ORIGIN = 0x820000, LENGTH = 1K
lock (rw!x) : ORIGIN = 0x830000, LENGTH = 1K
signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K
}
Those are the addresses used by the linker.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/