Pages: [1]   Go Down
Author Topic: [Solved] Wipe out sketch from arduino the hard way - 8U2 firmware bug  (Read 7148 times)
0 Members and 1 Guest are viewing this topic.
Greece
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Greek Tinker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Serial.println();

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

Thanks!
« Last Edit: March 01, 2011, 06:42:02 am by Space_Tinkerer » Logged


Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 203
Posts: 8720
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Greece
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Greek Tinker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the answer John. Actually I fixed it hitting the upload button about 20 times... smiley-razz 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 smiley-razz Thanks anyway
Logged


Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6143
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://arduino.cc/en/Hacking/DFUProgramming8U2

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

Logged


Greece
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Greek Tinker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Pluggy, I'll try updating the firmware, and post back the results
« Last Edit: February 23, 2011, 06:13:09 pm by Space_Tinkerer » Logged


Greece
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Greek Tinker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged


Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Austin, TX
Offline Offline
Newbie
*
Karma: 0
Posts: 32
Confucius says: Arduino leads to happiness.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

CO, USA
Offline Offline
God Member
*****
Karma: 5
Posts: 711
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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??



* Capture.JPG (58.39 KB, 627x531 - viewed 112 times.)
Logged

Pages: [1]   Go Up
Jump to: