> -----Original Message----- > From: [email protected] > [mailto:[email protected]] > On Behalf Of Bob Paddock > Sent: Monday, December 22, 2008 9:18 AM > To: [email protected] > 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(). _______________________________________________ AVR-chat mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-chat
