[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] eeprom issue
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] eeprom issue |
Date: |
Fri, 11 May 2007 01:12:39 +0200 (MET DST) |
"Steve Franks" <address@hidden> wrote:
> Anyway, if you have a project with two C/C++ sources, both of which
> include the same header, and you have:
> static char temp_ee __attribute__((section (".eeprom"))) = 10;
A module-internal EEPROM variable doesn't seem to make much sense to
me: the EEPROM is global anyway. OK, if you really want this for
module-internal EEPROM backing store, it's fine, and then you simply
get what you're asking for: two *different* variables, so each of the
module could store its own value into it. Obviously, module-internal
data are usually *not* declared/defined in header files, as they are
not intended to be shared.
For that reason, the keyword `static' does not make any sense at all
inside a header file, with a single exception: a function that is
declared `static inline'.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)