David Kelly <dke...@hiwaay.net> writes:

> On Fri, May 22, 2009 at 05:35:43AM -0700, Parthasaradhi Nayani wrote:
>> 
>> Hello all,
>> I was wondering if any one can suggest a decent method of
>> automatically assigning address space to variables in external EEPROM.
>> For internal EEPROM the attribute EEMEM will allocate addresses in
>> sequence. One can insert or delete a variable and the address space
>> gets adjusted properly. Is there a method of doing something similar
>> for external EEPROM. I have an external EEPROM where I would like to
>> store and retrieve variables. Thanks in advance for your suggestions.
>
> All EEMEM does is this in eeprom.h:
>
> #define EEMEM __attribute__((section(".eeprom")))
>
> AVR Studio convention is that internal .eeprom starts at 0x00810000. So
> what I'd do if I were you and wanted the compiler to assign static
> memory addresses in an external eeprom would be:
>
> #define       EEEXT __attribute__((section(".eeexternal")))
>
> Then in my Makefile (or somewhere in AVR Studio) would add this to the
> linker definitions (am not certain 0x00a10000 is available):
>
> LDFLAGS+=--section-start=.eeprom=00a10000

I suspect there's a typo in there.  Shouldn't this read

  LDFLAGS+=--section-start=.eeexternal=00a10000

?

Heike



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to