[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: David Kelly
Subject: Re: [avr-gcc-list] Storing variables in external memory - suggestions
Date: Fri, 22 May 2009 10:14:37 -0500
User-agent: Mutt/

On Fri, May 22, 2009 at 07:38:36AM -0700, Parthasaradhi Nayani wrote:
> Hello David Kelly,
> Thanks a lot for the suggestions. Yes, I understand that initializing
> the variables will not actually save the vales into the memory
> locations. I will try a sample code and revert. Thanks once again.

And remember that the first variable you put in EEEXT will have the
address of 0x00a10000 in the symbol tables but an AVR pointer is 16 bits
so it gets truncated to 0x0000. That is probably what you want in the
first place when talking to you external EEPROM.

Would be worth exploring putting a gcc attribute inside a typedef or
similar so that your external eeprom routines might type check for EEEXT
pointers in the address argument.

Metrowerks on Freescale CPUs does something similar where an address
could be near or far.

David Kelly N4HHE, address@hidden
Whom computers would destroy, they must first drive mad.

reply via email to

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