Yes, that's correct and thanks for pointing that out. Actually the boot start address is dependent on the boot flash section size. The Arduino Uno is set to a default of 256 words bytes which means the bootloader flash start address starts at word address 0x3F00 or byte address 0x7E00. Hence that's where that address comes from in the makefile. Setting the bootloader size for anything larger than 256 words bytes and then modifying the makefile's bootloader's section-start directive to match would be fine. So to amend my previous post, the correct way to modify it would be to select the bootloader size setting. Anything above 256 words would do.
Here's a quick reference:
- For 512 words, the section start would be 0x7C00 (0x3E00 x 2)
- For 1024 words, the section start would be 0x7800 (0x3C00 x 2)
- For 2048 words, the section start would be 0x7000 (0x3800 x 2)
And the table from the datasheet for reference.
That modification would allow you to fit the default Arduino optiboot, as well as if you need to add anything additional to the bootloader.
Thanks for the tip, westfw.
Akiba
FreakLabs