avr-chat
[Top][All Lists]
Advanced

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

RE: [Fwd: RE: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]]


From: Weddington, Eric
Subject: RE: [Fwd: RE: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]]
Date: Mon, 22 Dec 2008 09:28:11 -0700

 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden
>  On Behalf Of Bob Paddock
> Sent: Monday, December 22, 2008 9:18 AM
> To: address@hidden
> Subject: Re: [Fwd: RE: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]]
> 
> > Dimensioned variables are not accepted by the compiler e.g.:
> >
> > const prog_uint8_t eeprom[64];
> 
> Do Zero Length Arrays work in AVR GCC?
> I have never seen them used nor documented as such,
> but have never tried to use them.
> 
> http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
> 
> Try:
> const prog_uint8_t eeprom[0];
> 
> Why not initialize your array to the blank flash state?

Even if they did work, what would be the point? The compiler is not aware of a 
variable named 'eeprom' that resides in program memory. The user does not 
access the data via a symbol named 'eeprom' except, perhaps, by taking the 
address of the symbol. One can just #define a macro equivalent to the program 
memory address where the data resides. The compiler just views this as a block 
of memory, because the only way to access this is through memcpy_P(). 




reply via email to

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