I am using Atmega328 on a separate board, not on Arduino. So, I have to set the fuse values myself. I am confused over what to choose for the "Boot Flash Section Size". I will leave out the Arduino bootloader to save space. Should I choose the default (2048 words Boot start addr = $3800)?
Will the choice be affected if the bootloader is required?
Thank you.
If you're leaving out the bootloader to save space, why wouldn't you set it for the smallest size, 256 words?
You will need an AVR ISP programmer to load your sketch via the SPI-Reset-Vcc-Gnd pins.
CrossRoads:
If you're leaving out the bootloader to save space, why wouldn't you set it for the smallest size, 256 words?
You will need an AVR ISP programmer to load your sketch via the SPI-Reset-Vcc-Gnd pins.
Thanks. So, this "Boot Flash Section Size" is for reserving space for the bootloader. Without bootloader, I choose the smallest size. With a bootloader, choose the biggest size to be on the safe side. Is this correct?
No, choose a bootloader size that reflects the bootloader to be installed.
I think optiboot has been highly optimized to fit into 512 words for example to leave as much space as possible for a sketch.
optiboot has been highly optimized to fit into 512 words
512 bytes, actually...
If you don't set the BOOTRST fuse (zero is "set"), it won't matter what size you set. The most important effect of the size is to set the start address (of the bootloader) after restart. The other major effect is that only the bootloader section can do "self programming" of the chip, but the details are controlled by the protection bits. If your don't use BOOTRST, and you don't allow the boot section to write any memory (BLBxx = 10), then I don't think the size configured for the bootloader section has any other effects.