Arduino UNO (ATMEGA 328) : Solucion for uploading large sketches error

Hi folks!

Maybe you already realized that you could not upload a sketch bigger than 28672 bytes (0x7000) to a new Arduino UNO board although it should not be a problem due to a bug in the Arduino-0022 optiboot bootloader.
There is a solucion out there in the forums, but it took me a long night to get things to work.....thats why I am opening this topic, maybe I could help somebody with the same problem.

I managed to fix this bug following these simple steps, burning a new bugfree optiboot bootloader to the Arduino UNO board using an "old" Arduino Duemilanove bord as ISP programmer:

  1. download and unzip the bugfree optiboot hex file and the changed programmers.txt file (12 kb).
    http://www.megaupload.com/?d=TLJNOQDU

  2. copy the two optiboot_atmega328 files in your ...\arduino-0022\hardware\arduino\bootloaders\optiboot\ directory, overwriting the existing files

  3. copy the changed programmers.txt file in your ...\arduino-0022\hardware\arduino\ directory, overwriting the existing file

  4. copy the changed ArduinoISP sketch in you ...\arduino-0022\examples\ directory, overwriting the existing files

  5. upload the ArduinoISP sketch to the Duemilanove board

  6. desactivate the auto-reset function of the Duemilanove bord using a 120R resistor as described here:
    http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection

  7. follow these steps to prepare your Arduino Duemilanove board for ISP programming:
    http://arduino.cc/en/Tutorial/ArduinoISP

  8. CHANGE the TOOLS->BOARD option to Arduino UNO (this is the new bootloader we want to write)

  9. use BURN BOOTLOADER -> w/Arduino as ISP

Good luck.....at least for me it worked. Now I am able to upload sketches up to 32256 bytes!

IMPORTANT: I don“t know if all the steps above are necesary! At least using the new hex file for sure and I had to change the programmers.txt setting too, but maybe there is no need to update the Arduino ISP sketch. I just wrote down everything I did last night.......

......I hope this will be usefull for somebody, I got so many "pasive" help from the forums that I like to give something back. ;)

Chris

How long should it take for the new bootloader to finish uploading? My Arduino program has displayed the message "burning bootloader to I/O board" for about thirty minutes.

Thanks