[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: RE: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]]
From: |
Robert von Knobloch |
Subject: |
[Fwd: RE: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]] |
Date: |
Mon, 22 Dec 2008 16:59:18 +0100 |
User-agent: |
Thunderbird 1.5.0.14 (X11/20060911) |
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: address@hidden
> [mailto:address@hidden
> On Behalf Of Robert von Knobloch
> Sent: Monday, December 22, 2008 7:04 AM
> To: address@hidden
> 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.
- [Fwd: RE: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]],
Robert von Knobloch <=