Go Down

Topic: bootloader question for geeks (Read 571 times) previous topic - next topic

mehel

Hey! I am currently trying to understand everything around the serial programming of the bootloader.

I have translated the uisp script to avrdude because I am using an AVRISP mkII on a Mac. I do understand the lfuse and hfuse values (the datasheet helps)

One question remains however: I figured that the bootload code is Intel Hex encoded. Looking at the lines in the you can find this:
:101C000012C02BC02AC029C028C027C026C025C0AA

This decodes to:
Line Length: 0x10 (16) bytes count
Adress: 0x1C00
Record type: 0x00 Data
+ Data

The address encoded here is 0x1C00. This looks strange to me since the fuse bytes define that the bootload starts at 0xE00 (BOOTSZ set to 0x01)?

Who is able to explain this to me? I don't know the bootloader works, since I wated to understand and check everything before I give it a try....

-mj


gck

#1
Jun 18, 2006, 05:34 pm Last Edit: Jun 18, 2006, 05:35 pm by gck Reason: 1
Quote
The address encoded here is 0x1C00. This looks strange to me since the fuse bytes define that the bootload starts at 0xE00 (BOOTSZ set to 0x01)?


I don't know how the bootloader works either (I have almost no knowledge about microcontroller programming), but I can confirm that you figured out the fuse bytes correctly (you indeed have to set it to 1k code size, starting at 0xE00) and that the bootloader as included in Arduino 0004 works if you burn it onto an out-of-the-box atmega8. I burned it onto several controllers (usuing AVRstudio on Windows though, since I couldn't get the avrispII to work on the Mac yet).

I hope that helps.

mehel

Thanks!
I need to admin that this is probably not a "Trouble" post. It is just that I want to know what is going on :)

-mj

mellis

The addresses are the same, just with different units.  The fuses specify the bootloader size in words, and the .hex file gives an address in bytes; 0xE00 times 2 = 0x1C00.

mehel

Thanks for the enlightment!!!

-mj

Go Up