Eric,

In fact I can create named variables in the flash section, only they must be 
initialised, for example:

const prog_uint8_t eepromimage[] = {
    0,1,2,3,4,5,6,7,8,9,
    10,11,12,13,14,15,16,17,18,19,
    20,21,22,23,24,25,26,27,28,29,
    30,31,32,33,34,35,36,37,38,39,
    40,41,42,43,44,45,46,47,48,49,
    50,51,52,53,54,55,56,57,58,59,
    60,61,62,63
};

Allows me to put an image of (in this case) the EEPROM of the target and I can 
then access it fine using memcpy_P();


Dimensioned variables are not accepted by the compiler e.g.:

const prog_uint8_t eeprom[64];

is flagged as an error (sadly for me).

Regards,

Bob


> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]]
>  On Behalf Of Robert von Knobloch
> Sent: Monday, December 22, 2008 7:04 AM
> To: [email protected]
> Subject: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]
> 
> I assume you are saying that there is no support for 
> un-initialised variables in flash ?
> 

That is correct. The compiler does not know about any named variables in the 
flash address space. This is because you have to use accessor functions 
(bootloader code to write, special macros/functions to read) to get to the 
data, and these accessor functions use the physical address, not a named 
variable.





_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to