loathingKernel / ariadne-bootloader

A little less unfinished TFTP bootloader for Arduino Ethernet or Arduino with Ethernet Shield
45 stars 18 forks source link

avrdude: stk500v2_ReceiveMessage(): timeout #15

Open titusece opened 7 years ago

titusece commented 7 years ago

Hi,

I have a Arduino UNO (Arduino as ISP) , a Arduino MEGA2560 (to be programmed with Ariadne bootloader) and W5100 Ethernet shield.

As you have mentioned, I've followed the below link to program the Mega board with Ariadne-Bootloader(.h) using UNO(Arduino as ISP). http://www.gammon.com.au/forum/?id=11635

Able to program the default Mega bootloader code using gammon's url.

I have converted "ariadne_atmega2560_w5100.hex" bootloader hex file to "ariadne_atmega2560_w5100.h" using MUSHClient and flashed the code into Mega2560 board.

Now I have tried to upload the blink code using USB cable (as usual) but I have got the below error.

Can you please help me on this issue ?

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch

     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

     Using Port                    : COM16
     Using Programmer              : wiring
     Overriding Baud Rate          : 115200

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout An error occurred while uploading the sketch avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.

Regards, Titus S.

titusece commented 7 years ago

Moreover I have not connected the Ethernet Shield W5100 on Mega board while bootloader programming and serial uploading sketch. Is that reason I'm getting timeout error ?

Also I tried with "convertHexToByteArray.py" python script to convert .hex to .h file (instead of MUSHClient tool)

Log: Atmega chip programmer. Written by Nick Gammon. Version 1.37 Compiled on Dec 23 2016 at 09:14:38 with Arduino IDE 10611. Attempting to enter ICSP programming mode ... Entered programming mode OK. Signature = 0x1E 0x98 0x01 Processor = ATmega2560 Flash memory size = 262144 bytes. LFuse = 0xFF HFuse = 0xD8 EFuse = 0xFD Lock byte = 0xEF Clock calibration = 0x82 Bootloader address = 0x3E000 Bootloader length = 8192 bytes. Type 'Q' to quit, 'V' to verify, or 'G' to program the chip with the bootloader ...

Erasing chip ... Writing bootloader ... Committing page starting at 0x3E000 Committing page starting at 0x3E100 Committing page starting at 0x3E200 Committing page starting at 0x3E300 Committing page starting at 0x3E400 Committing page starting at 0x3E500 Committing page starting at 0x3E600 Committing page starting at 0x3E700 Committing page starting at 0x3E800 Committing page starting at 0x3E900 Committing page starting at 0x3EA00 Committing page starting at 0x3EB00 Committing page starting at 0x3EC00 Committing page starting at 0x3ED00 Committing page starting at 0x3EE00 Committing page starting at 0x3EF00 Committing page starting at 0x3F000 Committing page starting at 0x3F100 Committing page starting at 0x3F200 Committing page starting at 0x3F300 Committing page starting at 0x3F400 Committing page starting at 0x3F500 Committing page starting at 0x3F600 Committing page starting at 0x3F700 Committing page starting at 0x3F800 Committing page starting at 0x3F900 Committing page starting at 0x3FA00 Committing page starting at 0x3FB00 Committing page starting at 0x3FC00 Committing page starting at 0x3FD00 Committing page starting at 0x3FE00 Committing page starting at 0x3FF00 Written. Verifying ... No errors found. Writing fuses ... LFuse = 0xFF HFuse = 0xD8 EFuse = 0xFD Lock byte = 0xEF Clock calibration = 0x82 Done. Programming mode off. Type 'C' when ready to continue with another chip ...

Any help ?

titusece commented 7 years ago

In addition to that, after flashed bootloader, I've not seen Ethernet LED blinks (no activity). What could be the problem ?

Nekraus commented 7 years ago

Hello! yeah you have to connect the ethernet shield but be carefull you must connect the shield as explain here https://www.arduino.cc/en/Reference/Ethernet And it didn't work when the pins 11 to 13 was plugged on the arduino. I bended the pins

sorry my english, it is not my native language

have a nice day !

2016-12-23 16:31 GMT+01:00 Titusrathinaraj Stalin notifications@github.com :

In addition to that, after flashed bootloader, I've not seen Ethernet LED blinks (no activity). What could be the problem ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LoathingKernel/Ariadne-Bootloader/issues/15#issuecomment-269005965, or mute the thread https://github.com/notifications/unsubscribe-auth/AKqK7wT8Mhg2StxjhC7q9dhyWLhMyCOXks5rK-lJgaJpZM4LUjlM .

titusece commented 7 years ago

Thank you so much Nekraus! Let me try it out :) :+1:

titusece commented 7 years ago

Hi Nekraus, I've programmed the bootloader to Mega board without shield on it. After flashed the bootloader code, I've connected shield and checking the ethernet LED activity and tried to upload the code via USB interface on Mega board (which has the new ariadne bootloader) But still I'm getting the same problem.

I understand that we should connect shield on Mega board as its using the SPI pins were used and mapped for Ethernet controller and the same SPI pins were also used for ICSP programming.

Is it mandatory to connect the shield while programming (thats why you'd pended the pins) ?

Can you please provide your bootloader .h file of Mega2560 board ?

Thanks for support.

titusece commented 7 years ago

Hi Nekraus,

I've followed the below link for Arduino UNO(programmer) to Arduino MEGA(to be programmed with TFTP bootloader) https://1.bp.blogspot.com/-369p0vA9eSo/V1NK1rlGftI/AAAAAAAATZI/QyG2WTfzIIc58ZLfBgdYvY4YqGVBFmYhwCLcB/s1600/Uno%2BArduino%2BISP%2Bto%2Bprogram%2BMega.png

Able to flash and boot the default bootloader from Gamma. (bootloader_atmega2560_v2.h)

I edited the file Atmega_Board_Programmer.ino for my ariadne TFTP bootloader .h file which is converted from ariadne_atmega2560_w5100.hex

C:\Program Files (x86)\Arduino\hardware\ariadne\bootloaders\ariadne\ariadne_atmega2560_w5100.hex

if USE_ATMEGA2560

// #include "bootloader_atmega2560_v2.h"

include "ariadne_atmega2560_w5100.h"

endif

Then I uploaded this modified code into Arduino UNO and type "G" to upload the ariadne TFTP bootloader code like below.

Atmega chip programmer. Written by Nick Gammon. Version 1.37 Compiled on Dec 23 2016 at 22:45:01 with Arduino IDE 10611. Attempting to enter ICSP programming mode ... Entered programming mode OK. Signature = 0x1E 0x98 0x01 Processor = ATmega2560 Flash memory size = 262144 bytes. LFuse = 0xFF HFuse = 0xD8 EFuse = 0xFD Lock byte = 0xEF Clock calibration = 0x82 Bootloader address = 0x3E000 Bootloader length = 8192 bytes. Type 'Q' to quit, 'V' to verify, or 'G' to program the chip with the bootloader ... Erasing chip ... Writing bootloader ... Committing page starting at 0x3E000 Committing page starting at 0x3E100 Committing page starting at 0x3E200 Committing page starting at 0x3E300 Committing page starting at 0x3E400 Committing page starting at 0x3E500 Committing page starting at 0x3E600 Committing page starting at 0x3E700 Committing page starting at 0x3E800 Committing page starting at 0x3E900 Committing page starting at 0x3EA00 Committing page starting at 0x3EB00 Committing page starting at 0x3EC00 Committing page starting at 0x3ED00 Committing page starting at 0x3EE00 Committing page starting at 0x3EF00 Committing page starting at 0x3F000 Committing page starting at 0x3F100 Committing page starting at 0x3F200 Committing page starting at 0x3F300 Committing page starting at 0x3F400 Committing page starting at 0x3F500 Committing page starting at 0x3F600 Committing page starting at 0x3F700 Committing page starting at 0x3F800 Committing page starting at 0x3F900 Committing page starting at 0x3FA00 Committing page starting at 0x3FB00 Committing page starting at 0x3FC00 Committing page starting at 0x3FD00 Committing page starting at 0x3FE00 Committing page starting at 0x3FF00 Written. Verifying ... No errors found. Writing fuses ... LFuse = 0xFF HFuse = 0xD8 EFuse = 0xFD Lock byte = 0xEF Clock calibration = 0x82 Done. Programming mode off. Type 'C' when ready to continue with another chip ...

Any help please ?

Regards, Titus S.