I burned Ariadne bootloader onto my Mega 2560. After that I have some issues, so I wonder if I'm doing it correctly.
(details below, but in a nutshell I have problem loading a sketch via TFTP or via Codebender.cc).
Burner is an Arduino Uno. Using the Arduino IDE (v1.0.5) with the UNOs COM port, UNO board type (i.e. not "Mega" or "Mega with Ariadne" which is the burn target, correct?) and the "Arduino as ISP" setting.
With the following connections:
Arduino Uno Target Mega2560
D10 (SS) Reset
D11 (MOSI) D51
D12 (MISO) D50
D13 (SCK) D52
Gnd Gnd
+5V +5V
as per these instructions (i.e. no capacitor used on Megas reset pin):
I'm creating the hex file with the Lua script from Nick Gammon, from the above site (using MushClient on Vista)
ariadne_atmega2560.hex (size 10 872) from
is used.
The hex output from Lua script ends with a lot of "0XFF" (when the above hex file is used).
Output is pasted in to the "bootloader_atmega2560_v2.h" file, instead of the original hex content (correct? Seemed like the easiest way).
Uploading (of "atmega_board_programmer" sketch, without any shields attached) it to the UNO gives:
avrdude: verification error, first mismatch at byte 0x1380
0xff != 0xe0
but if I remove all the ending "0XFF" then the sketch uploads fine:
Binary sketch size: 16 854 bytes (of a 32 256 byte maximum)
Serial monitor to 115200 looks OK:
Atmega chip programmer.
Written by Nick Gammon.
Version 1.21
Compiled on Jan 6 2014 at 16:51:34
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 = 0x9A
Bootloader address = 0x3E000
Bootloader length = 3843 bytes.
Type 'V' to verify, or 'G' to program the chip with the bootloader ...
Burn is also OK:
...
No errors found.
...
Done.
Via Linux I can successfully transfer a converted bin file (converted with avr-objcopy -I ihex xxx.cpp.hex -O binary xxx.cpp.bin and uploaded as per GitHub - codebndr/Ariadne-Bootloader: A little less unfinished TFTP bootloader for Arduino Ethernet or Arduino with Ethernet Shield info (e.g. get "received ACK <block=41>"). I do however need to press the Arduino reset button in order to be able to upload the bin file.
But, the sketch does not work if transferred via TFTP.
Codebender can't upload a sketch either (coderbender.cc, I've forwarded port 69 to the default TFTP 192.168.1.128 address). The Codebender transfer never finishes in the GUI.
Serial transfer via the Arduino IDE is still OK, i.e. the sketch works after it's transferred that way.
Is the 'process' I'm using correct?
Thanks in advance!! (sorry for the long post!)