Page 1 of 1

Uploading sketches via ethernet

Posted: Wed Jan 25, 2017 4:59 pm
by ianmcc

I spent the evening hunting around trying to find out how to upload sketches to the EtherMega via the network. I've come to the conclusion that it isn't so easy, and I don't have the correct ISP programmer to flash the bootloader, but in case anyone is interested I thought I'd summarize what I've found here. If anyone has any extra info it would be really useful too!

For my current project, I will use an Ether10 but I don't have a spare one, but I do have a spare EtherMega lying around so I was thinking to use that to get things started while I wait for the Ether10 to arrive in the post. For the Ether10, Freetronics have a tutorial on how to use the network to upload sketches using an Ether10 (or arduino with ethernet shield) at ... Ii8YWf-vmE .

In principle, it is possible to use a similar procedure for the EtherMega. The main difference is that the freetronics bootloader doesn't support the ATmega2560. However, I found another bootloader project at ttps:// that does, (That bootloader also supports the ATmega328P used in the Ether10, I haven't looked to see if it has any advantages over the freetronics bootloader).

However, I haven't been able to try this out, because the bigger problem is that the 'cheap' ISP programmers (Arduino as an ISP, the Sparkfun Pocket Programmer, etc) don't support the ATmega2560 because they can't address more than 64K of flash -- the bootloader is stored at the end so these programmers cannot be used to write the bootloader. As far as I can tell, the only way to rewrite the bootloader for the ATmega2560 is with the offical AVR-ISP MkII or a clone (eg ... e-hardware ).

I don't know why it isn't possible to use ArduinoISP as an AVR-ISP Mk-ii clone. But it seems that it *is* possible to reprogram the DFU (which normally handles the USB connection) on an Arduino to act as an AVR-ISP mk-II. Instructions at ... P-MkII-Cl/ . I intend to try this soon.

Re: Uploading sketches via ethernet

Posted: Thu Jan 26, 2017 6:01 am
by ianmcc
According to this thread viewtopic.php?f=25&t=5494&p=10781&hilit=upload#p10781 it is possible to use the USBasp programmer to flash the bootloader on a 2560, so that is probably the cheapest programmer compatible with this board. I've ordered one, so I'll update this post once I've tried it.