[Solved] Wipe out sketch from arduino the hard way - 8U2 firmware bug

Hello everyone!

I bumped to a problem as i was playing with my arduino. I was working with serial communications on arduino. So I wrote a sketch, put a


command in loop() (I missed my inner if loop, and it runs infinitely) so now i try to upload a new program but i can't because the program keeps printing println on the serial port. Is there a way I can wipe out the program? Preferably a hardware way cause software doesn't seem to work...

P.S. I tried anything obvious (reset, unplug and replug) etc


On modern Arduinos the upload process should reset the processor for you and cause the bootloader to run. On older models you had to push the reset button just before the upload happened. You should be able to upload a new sketch if you press the Reset button at just the right time.

If you have a second Arduino you can use it as an In-system Serial Programmer to upload a sketch. That doesn't go through the USB port on the target Arduino so it will override any existing programming.

Thanks for the answer John. Actually I fixed it hitting the upload button about 20 times... :P As you mentioned uploading should reset the processor (I have a new Arduino Uno, which I bought about 2 weeks ago) but it didn't work.. I don't know what exactly happened, but persistance pays after all :P Thanks anyway

Try holding the processor in RESET until right before the IDE starts the upload.

To hold in Reset, press and hold the reset button before applying power. Do not release until about ~1 second after the "Sketch: XXX of XXXX bytes" message.

Sounds like the 8U2 firmware bug on the Uno/Mega2560. Upgrading the firmware will probably cure it if it is.


This is the easy way of putting it in DFU mode :

Thanks Pluggy, I'll try updating the firmware, and post back the results

UPDATE – I just updated the firmware, and now it works great! Pluggy your guide was great help.
Maybe you should add the image to the official guide, because the description there is not very clear.

Anyway, I intentionally loaded the faulty program again, which prints to the serial port, and when I uploaded something else it worked right away. So bug fixed!

We'll need Massimo or another admin to do that. Us mere mortals can't alter the main website.......

I was having problems with my UNO and Ubuntu when using the serial communication. Pluggy's post and flashing the firmware solved my problem :) Thank you!

Well, looks like I have to resort to this. Which is just as well, since my bootloader doesn't do the delay after reset to see if anything's coming in (and I seriously need this, as a n00b programmer).

So, any reason to use Ada's bootloader instead of the latest from github?

Hello pluggy, many thank's for your good picture. I'm using an mega2560 and have some trouble to upload some sketches to it. Now I wan't to test the 8U2 bugfix. But "the solder jumper on the back of the board (near the map of Italy)" are not present. In my opinion the solder jumpers below the 6 pin ICSP block are the right one on MEGA2560 boards (http://arduino.cc/en/uploads/Main/ArduinoMega2650Back.jpg). Can anybody confirm this? Thanks in advance, Thomas

I am working with the UNO and am trying to reinstall my 8U2 firmware. I have followed all the above directions, and this is the error I am getting not…any ideas??