avr-chat
[Top][All Lists]
Advanced

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

[avr-chat] BOOTLOADER on ATMega644


From: Robert von Knobloch
Subject: [avr-chat] BOOTLOADER on ATMega644
Date: Mon, 22 Dec 2008 10:56:20 +0100
User-agent: Thunderbird 1.5.0.14 (X11/20060911)

Hello,

I am currently trying to write to the flash of a Mega644 using the
following syntax:
"BOOTLOADER_SECTION void ihex2flash(uint8_t num_pages, uint8_t page_size)"
(A function which will, hopefully, store an image of a Tiny13  flash,
already loaded into the Mega644 RAM via an ihex loader, in the Mega644
flash area.
The Mega644 is an ISP-programmer/functional tester  for Tiny13-based
devices.
According to the data sheet, the default bootloader area is 0x7000
0x7FFF. When I compile my code, I get the following error:

/opt/cross/lib/gcc/avr/4.1.2/../../../../avr/bin/ld: section .bootloader
[00002502 -> 000025ad] overlaps section .data [00002502 -> 0000289d]

I do not understand why the addresses seem so wrong and also why the
.bootloader section in flash shoud be able to confict with .data section
in RAM,  which is in a separate memory map.
Also the bootloader address range is fuse programmable which I have to
be able to tell the compiler. How can I do this?

I have not, as yet, found where these sections are specified, perhaps
someone could tell me if I need to correct some definition files.



A second issue (to do with compiler features) is the following:

I am aware that the compiler has problems with Harvard architecture and
note that the storage of objects in the flash memory has somewhat
limited support.

I wish to be able to create an array of un-initialised, but dimensioned
structs in the flash, which I can later fill out by writing (page-wise)
into them.

The values for the objects would be loaded from a host PC by means of a
menu-driven interface in the Mega644, communication over RS232 to a
terminal program (minicom) on the PC.

The structs would be approximately as follows:

struct Tiny13 {
char title[] = "Tiny13 project #1";
uint8_t flash[1024];
unsigned int flashsize;   // actual flash used
uint8_t eeprom[64];
uint8_t fuses[2];
uint8_t signature[3];
uint8_t pagesize[16];
uint8_t numpages[32];
} tiny13projects[4];

and a similar struct array for Tiny24 projects.

Ideally, as shown, a mix of dimensioned and initialised members, but
just dimensioned would also be ok.

Has anyone any thoughts how I could approach this ?

I would be grateful for any suggestions.

Thanks,

Robert von Knobloch.




reply via email to

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