Sketches will not upload to Mega with Ariadne Bootloader

I have loaded the Ariadne Bootloader onto an Arduino Mega 2560, but when trying to load a simple sketch project (Blink) onto the Mega (using the ArduinoISP), I get the following error:

Binary sketch size: 1,628 bytes (of a 258,048 byte maximum)
avrdude: verification error, first mismatch at byte 0x0000
0x01 != 0x8e
avrdude: verification error; content mismatch

I'm using Arduino 1.0.6.

Board selected - I've tried both Arduino Mega 2560 (Ariadne Bootloader) and Arduino Mega 2560 (Ariadne Bootloader Debug) - both give the same error.

I have the Arduino Mega 2560 with an ethernet shield connected (HanRun shield).

When powered (via usb), the pin 13 LED flashes rapidly (as I expected from the ReadMe - 5. Push reset button to start the bootloader. The LED will blink rapidly.).

I have also tried using the tftp command (Windows command line), but a timeout occurs.

Has anyone encountered a similar problem? Does anyone have any suggestions?

Remove your ethernet shield connected . Just upload the blink example.

Share me the output

It seems to hang, it's still just saying Uploading...

No activity on the Arduino either.

It finally gave some output:

Binary sketch size: 1,628 bytes (of a 258,048 byte maximum)
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x10
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x11
avrdude: stk500v2_disable(): failed to leave programming mode

Try to disable your firewall/antivirus. I have had the "hanging" problem before and disabling shields fixed it, just something else to try.

Turning off the firewall made no difference.

Without the shield, the Mega seems to hang. There is no response when the reset button is pushed.

If I connect the shield, the LED starts flashing and the reset button seems to respond (ethernet lights and the flashing LED 13 goes off).

In that case, I can only suggest a few things.

Have you tried disconnecting the board from any external hardware you may have attached (could be anything, LCDs, speakers, whatever) and running the programmer then? In particular, make sure TX0 and RX0 are not connected to anything when you try to upload.

If that doesn’t help, you could have a problem, but it’s not likely it’s fatal. Make sure your power is connected properly and all your connections are good. If that’s all fine, try reflashing the bootloader.

I RECOMMEND RESTART YOUR COMPUTER

CHECK THE MEGA BEING DETECTED IN DEVICE MANAGER

CHECK WHETHER THE BLINK led LIGHT ALWAYS HIGH OR KEEP FLICKERING; IN THAT CASE BOOTLOOADER MIGHT CRASHED.

IF NOT JUST UPLOAD BLINK PROGRAM & UPLOAD CODE. SHARE US THE ERROR YOU GOT , THIS TIME

Have you tried disconnecting the board from any external hardware you may have attached

Nothing is connected to the board except the usb cable to the PC.

If that's all fine, try reflashing the bootloader.

All connections seems good. I've tried reflashing the bootloader with the Ariadne bootloader, still shows the same error in ArduinoISP.

I RECOMMEND RESTART YOUR COMPUTER

  • Done, no difference

CHECK THE MEGA BEING DETECTED IN DEVICE MANAGER

  • It shows up in Device Manager.

CHECK WHETHER THE BLINK led LIGHT ALWAYS HIGH OR KEEP FLICKERING; IN THAT CASE BOOTLOOADER MIGHT CRASHED.

  • The pin 13 LED stays on, no flashing.

I'm reloading the standard Arduino bootloader now to see if the same error shows. It's seems to be taking too long though. How long should the standard bootloader take to burn?

your bootloader got crashed. You need to use avr pocket programmer to upload the code.

I'm using the AVR Pocket Programmer.

When I try to burn the bootloader via Arduino, nothing happens, it seems like Arduino hangs.

If I try to burn the bootloader using cmd window, it seems to work:

avrdude: verifying...
avrdude: 755 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.

But when I then try to upload a sketch (Blink), it gives this:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

How you uploading code. Using avr pocket programmer or USB here.

Once bootloader uploaded not need to use avr pocket programmer.

But if you getting same error. in file u can use avr pocket program to upload code. try to insert some serial print statement & check whether getting output or not.

http://forum.arduino.cc/index.php?topic=83079.0

The time-out errors were when I tried to program using usb.

I have now successfully uploaded Blink using the AVR Pocket Programmer. I tried again using usb, but it still gives the same time-out error.

This was using the standard Arduino bootloader though. Going to try a fresh copy of the Ariadne bootloader to check if it was not anything that I changed that caused the previous issues.

I'll post the results as soon as I've got the Ariadne bootloader running again.

Uploading sketches via Arduino still doesn't work (I've tried a different board where I haven't messed with the bootloader, and uploading via Arduino works fine - which to me means that the bootloader or the board with the new bootloader is the issue, just don't know how to fix it yet).

i think your atmega2560 Ic being corrupted.

you need proper software to upload DFU. more detail provided here. You can try this before proceeding ahead'

http://arduino.cc/en/Main/arduinoBoardMega2560

Thanks, will try this and post back.

i think your atmega2560 Ic being corrupted.

Ok, I got the Arduino Mega back into it's standard form - I can upload sketches using the Arduino IDE.

I've researched a bit more on the Ariadne Bootloader, and I found that it hangs when the ethernet shield is not attached. So now it seems that the Ariadne bootloader is working as it should.

The problem that remains is that when I try to transfer a file using TFTP (using the Windows command line), a time-out occurs. I did find a comment that the Windows TFTP client service is buggy, but the comment was from a couple of years ago.

Does anyone know if there is another way of transferring files using TFTP in Windows? I've tried the TFTPUtil Client, but if also gives a time-out message.

Does anyone know if this is this a bootloader issue or a Windows issue (or something else)?

When I try to upload Blink using Arduino IDE (with the Ariadne bootloader on the mega), it seems to overwrite the bootloader. I have now uploaded a new bootloader to the Mega2560 - NetLoad bootloader (It's based on the Ariadne bootloader).

It now seems to work perfectly when uploading sketches using the Arduino IDE, but the TFTP still times out. (It actually looks like it corrupts/deletes the app running on the mega, since it only runs the bootloader after an attempted TFTP transfer, and not the bootloader then the app).

I have enabled TFTP (not enabled by default on Windows) and have double checked the IP addresses.

Does anyone have any ideas about this one?

It works :D

The TFTP time-out issue was due to the firewall (thanks TorakFirenze for the suggestion). I created inbound/outbound rules to allow traffic through ports 69 and 46969, but apparently that isn't good enough - you have to disable the firewall completely (as far as I understand - now...).

The final working system uses the Arduino Mega2560 with NetLoad bootloader (https://github.com/d0ughb0y/NetLoad) and an ethernet shield.

Uploading sketches via the Arduino IDE also works using this setup.

I have had exactly the same problem. My Arduino Mega ADK is unable to receive any command from my computer.

I installed the Ariadne Bootloader through the Boards Manager of the Arduino 1.6.5, according to the following thread:

I have downloaded and installed the Atmel’s FLIP software, but I don’t know how to proceed to communicate with the board. I have reviewed some tutorials from the web like this:

https://www.virtuabotix.com/how-to-cure-sudden-uno-death-syndrome/

but the bottom of the Arduino Mega ADK is not the same as the 2560… Does somebody know what pins should I use? How to proceed?

Thanks,

A.

SandraOos: It works :D

The TFTP time-out issue was due to the firewall (thanks TorakFirenze for the suggestion). I created inbound/outbound rules to allow traffic through ports 69 and 46969, but apparently that isn't good enough - you have to disable the firewall completely (as far as I understand - now...).

The final working system uses the Arduino Mega2560 with NetLoad bootloader (https://github.com/d0ughb0y/NetLoad) and an ethernet shield.

Uploading sketches via the Arduino IDE also works using this setup.

Excellent! thanks alot? this helped me!

Did anyone managed to avoid using newEEPROM as it does not support get and put functions?