Go Down

Topic: I noticed something in the optiboot bootloader hex file for Arduino. Why so? (Read 391 times) previous topic - next topic

volkanspace

When I look at the bootloader hex file, the starting address from the word type of the program is 7E00 according to intel-hex format. This is the 3F00. The interesting part starts right now. According to the Atmega328p datasheet, the BOOTS1 and BOOTS2 registers must be set for this to start from 3F00. But when I look at the Arduino Uno fuse settings,

Quote
lfuse = 0xff
hfuse = 0xde
efuse = 0x05

is defined as such. In this case . The BOOTS1 and BOOTS2 parameters in the High fuse settings parameter are set as not set.

Is there something I'm missing?



Quote
:107E0000112484B714BE81FFF0D085E080938100F7
:107E100082E08093C00088E18093C10086E0809377
:107E2000C20080E18093C4008EE0C9D0259A86E02C
:107E300020E33CEF91E0309385002093840096BBD3
:107E4000B09BFECF1D9AA8958150A9F7CC24DD24C4
:107E500088248394B5E0AB2EA1E19A2EF3E0BF2EE7
:107E6000A2D0813461F49FD0082FAFD0023811F036
:107E7000013811F484E001C083E08DD089C08234E0
:107E800011F484E103C0853419F485E0A6D080C0E4
:107E9000853579F488D0E82EFF2485D0082F10E0AE
:107EA000102F00270E291F29000F111F8ED06801E7
:107EB0006FC0863521F484E090D080E0DECF843638
:107EC00009F040C070D06FD0082F6DD080E0C81688
:107ED00080E7D80618F4F601B7BEE895C0E0D1E017
:107EE00062D089930C17E1F7F0E0CF16F0E7DF06D8
:107EF00018F0F601B7BEE89568D007B600FCFDCFD4
:107F0000A601A0E0B1E02C9130E011968C91119780
:107F100090E0982F8827822B932B1296FA010C0160
:107F200087BEE89511244E5F5F4FF1E0A038BF0790
:107F300051F7F601A7BEE89507B600FCFDCF97BE46
:107F4000E89526C08437B1F42ED02DD0F82E2BD052
:107F50003CD0F601EF2C8F010F5F1F4F84911BD097
:107F6000EA94F801C1F70894C11CD11CFA94CF0C13
:107F7000D11C0EC0853739F428D08EE10CD085E9AC
:107F80000AD08FE07ACF813511F488E018D01DD067
:107F900080E101D065CF982F8091C00085FFFCCF94
:107FA0009093C60008958091C00087FFFCCF809118
:107FB000C00084FD01C0A8958091C6000895E0E648
:107FC000F0E098E1908380830895EDDF803219F02E
:107FD00088E0F5DFFFCF84E1DECF1F93182FE3DFCA
:107FE0001150E9F7F2DF1F91089580E0E8DFEE27F6
:047FF000FF270994CA
:027FFE00040479
:0400000300007E007B
:00000001FF
Here is the optibootbootloader.hex file

DrAzzy

BOOTSZ1 and BOOTSZ0 must be 1 per table 26-7 to start bootloader at 0x3F00.

Per Table 27-6, those are bits 1 and 2 of high fuse.

0xDE is 0b11011110

BOOTSZ1 and BOOTSZ0 are hence set to 1, selecting the 0x3F00 as the start of the bootloader.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

volkanspace

BOOTSZ1 and BOOTSZ0 must be 1 per table 26-7 to start bootloader at 0x3F00.

Per Table 27-6, those are bits 1 and 2 of high fuse.

0xDE is 0b11011110

BOOTSZ1 and BOOTSZ0 are hence set to 1, selecting the 0x3F00 as the start of the bootloader.
i use this tool to calculate fuse settings  http://www.engbedded.com/fusecalc/


When I enter the high fuse settings 0xde for the current settings, there is no tick for Boots1 and boots2.



pert

So, if you're going to ask the same question multiple places then it's only common courtesy to post links to the other posts. That way the people taking time out of their day to offer you free help can check to see whether they'll be wasting their time. I also will make it easy for others with the same question to find all the relevant information. Since you weren't considerate enough to post the links, I did it for you.

dmjlambert

Unchecked fuses in a fuse calculator means they are unprogrammed.   
Programmed fuses are the ones set to 0, unprogrammed are set to 1.   In the data sheet I notice for a 256 word boot section, BOOTSZ0 and BOOTSZ1 fuses are both unprogrammed, meaning they are set to 1.   Does this answer the question, volkanspace?


Go Up