If you reduce the bootloader size on a 328p from 2kb to 1.5kb, is the .5kb available to the application? Is this space automatically available or do I have to change something on the Arduino IDE before I upload my code? Or do I need to upload using avrdude?
See here for allowable boot-sector sizes, and the corresponding fuse-settings. Beware: the units are 16-bit words, not bytes (caught me out ) http://www.engbedded.com/fusecalc/
Thanks for the replies. Yes, I know to change the fuses and start address when I upload the bootloader using avrdude, but do I need to make any changes when I am uploading the application using the Arduino IDE? Is it set for the max size by default?
If you reduce the bootloader size on a 328p from 2kb to 1.5kb, is the .5kb available to the application? Is this space automatically available or do I have to change something on the Arduino IDE before I upload my code? Or do I need to upload using avrdude?
First of all, optiboot is currently 512 bytes, so on an Uno (or other Arduino on which you've installed optiboot) you already have an additional 1.5k available.
The AVRs in use on on Arduinos have special support for a "bootloader section" whose size you can set via the BOOTSZ fuses. However, the size is always a power of two: 512, 1024, 2048, or 4096 bytes (on 328p; actual numbers vary with CPU type.) Reducing the bootloader size from 2k to 1.5k is thus useless; you would have to get down to less than 1k in order to change the fuse settings.
renasis:
Thanks for the replies. Yes, I know to change the fuses and start address when I upload the bootloader using avrdude, but do I need to make any changes when I am uploading the application using the Arduino IDE? Is it set for the max size by default?
The boards.txt file tells the IDE about actual memory size avalible for the various chip types/bootloader version: