Arduino Forum

Using Arduino => Programming Questions => Topic started by: cricchetto06 on Apr 17, 2012, 11:54 pm

Title: Bootloader upgrade
Post by: cricchetto06 on Apr 17, 2012, 11:54 pm
Hi guys, i would upgrade bootloader in my arduino uno because i've the problem with sketch larger than 29K. What's the true bootloader for atmega328p-pu? There are many hex files in hardware/arduino/bootloaders/atmega directory and one of theme is ATmegaBOOT_168_atmega328.hex. Is it the bootloader for atmega328p-pu?
Title: Re: Bootloader upgrade
Post by: florinc on Apr 18, 2012, 12:10 am
Quote
i've the problem with sketch larger than 29K

You won't get rid of the problem by "upgrading". You would need to downgrade, to a bootloader that takes less flash memory than the one you have currently burnt in.
The smallest bootloader takes about 2K, which will allow you only 1K more (from 29K to 30K) for your sketch.
Title: Re: Bootloader upgrade
Post by: winner10920 on Apr 18, 2012, 12:47 am
Or get an isp programmer, then there is no bootloader and you save all that space
Title: Re: Bootloader upgrade
Post by: cricchetto06 on Apr 18, 2012, 01:44 am
uhm........28924 bytes (of a 30720 byte maximum). I think that the bootloader use max 2k of memory. With the sketch size of 28924 bytes  i can't upload sketch. does anyone know the size of optiboot bootloader? It is in a subdir of arduino ide.I've a old bootloader version and i try to upgrade it. Read posts in this link: http://www.forums.adafruit.com/viewtopic.php?f=31&t=19243 (http://www.forums.adafruit.com/viewtopic.php?f=31&t=19243)
Title: Re: Bootloader upgrade
Post by: liuzengqiang on Apr 18, 2012, 01:51 am
optiboot is only 512 bytes so you will get  32K-0.5K free space.
Title: Re: Bootloader upgrade
Post by: doughboy on Apr 19, 2012, 06:40 am
use optiloader sketch to load optiboot bootloader. all you need is another uno or mega to load the optiloader sketch, hook up your atmega328 based board whose bootloader you want to update, and run the sketch.