[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] EEPROM variables
From: |
Artur Lipowski |
Subject: |
[avr-libc-dev] EEPROM variables |
Date: |
Mon, 26 May 2003 10:07:14 +0200 |
Current version of AVR-GCC requires for EEPROM variables a const qualifier
(without const: "error: xxxxxx causes a section type conflict").
Declarations of EEPROM handling functions in avr-libc totally ignore that
and to compile code without warnings an additional typecast is needed, eg.:
const uint8_t EE_sleep_time __attribute__ ((section (".eeprom"))) = 4;
eeprom_read_byte((uint8_t*)&EE_sleep_time)
It looks a little inconsistent.
I am not certain if it is a problem of the avr-libc or maybe AVR-GCC
compiler.
>From avr-libc point of view such variables are not pure constants and GCC
requirement is too restrictive.
What do you think about?
Maybe it will be better to change AVR-GCC behaviour?
Reagrds,
--
Artur Lipowski