Uploading sketches via ethernet

Combining the power of the ATmega2560 MCU with onboard Ethernet, a microSD card slot, an efficient switchmode power supply, and a small prototyping area. [Product page]
Post Reply
ianmcc
Posts: 6
Joined: Fri Aug 10, 2012 1:06 pm

Uploading sketches via ethernet

Post by ianmcc » Wed Jan 25, 2017 4:59 pm

Hi,

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 http://www.freetronics.com.au/pages/how ... 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://github.com/per1234/Ariadne-Bootloader 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 http://www.atmel.com/tools/avrispmkii.aspx or a clone (eg https://www.olimex.com/Products/AVR/Pro ... 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 http://www.instructables.com/id/Turn-Ar ... P-MkII-Cl/ . I intend to try this soon.

ianmcc
Posts: 6
Joined: Fri Aug 10, 2012 1:06 pm

Re: Uploading sketches via ethernet

Post by ianmcc » Thu Jan 26, 2017 6:01 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests