Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

need variables to be stored in EEPROM

2005-04-25 by arhodes19044

I see in the docs how to use the registers to access the EEPROM on 
my ATmega128.

However, Which part of it is allowed to be used?  Is there nothing 
in it unless I use it myself?

Does GCC-avr give me tools to allocate variables in eeprom 
automatically?  Should I use MALLOC in some manner?  I see some 
basic tools in libc to access EEPROM at a very low level.  Are there 
some higher level access routines?

I guess I do not really need much in the way of routines.  But it 
would be nice to have variables taged in some manner as residing in 
EEPROM, then I can read and write to them as normal variables with 
the access taken care-of invisibly in the background.

I only have a few variables of various sizes to save, but I may want 
to use the rest as a data-logging function, in some sort of circular 
buffer.  The circular buffer would be accessed as a big array 
structure, probably.

-Tony

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.