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

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

[avr-gcc-list] Data in EEPROM


From: gtoo
Subject: [avr-gcc-list] Data in EEPROM
Date: Fri, 13 Sep 2002 14:45:50 +0200

Hi all!

I store some amount of data in the EEPROM.

I use the following syntax:

#define EEPROM __attribute__((section(".eeprom")))

and define a few variables:

unsigned char EEP_IP_Address[]        EEPROM = { 192, 168, 1, 10 };
unsigned char EEP_GatewayAddress[]    EEPROM = { 192, 168, 1, 1 };
unsigned char EEP_SubnetAddress[]     EEPROM = { 255, 255, 255, 0 };

All of this works as it's supposed to, but I've noticed that whenever I add a 
new variable to the EEPROM section, the .data section is also increased with 
the same number of bytes as for the EEPROM.

Am I doing something wrong here, or is this the way it should work?

If there is a lot of information stored in the EEPROM like this, the RAM is 
used up pretty quick.

Regards gtoo

avr-gcc-list at http://avr1.org



reply via email to

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