Upload fails (programmer not responding) when sketch > 28k

The EtherTen combines an Uno-equivalent Arduino-compatible board and Wiznet-based Ethernet support, along with a microSD card slot and Power-over-Ethernet support. [Product page]
Post Reply
tobiw
Posts: 2
Joined: Wed Apr 25, 2012 10:18 pm

Upload fails (programmer not responding) when sketch > 28k

Post by tobiw » Wed Apr 25, 2012 10:31 pm

I've got a EtherTen and tried to upload a fairly large sketch (approaching 30k, it's using Ethernet and SD libraries). However, after a few seconds of uploading, I get the message "programmer is not responding".

I've tried reducing the size of my sketch and uploading works again when the size of the compiled sketch drops below 28k. However, I think this shouldn't be an issue because
1) arduino-1.0 says: sketch size 28123/32155 (I don't have the exact numbers here at the moment but something along those lines)
2) this is important: when I upload the same failing (too big) sketch to a normal Arduino Uno, it works.

Is there anything I can do to make my EtherTen accept the same big sketches as my Arduino Uno? I assumed they work exactly the same so it should accept the same sketches. I've searched the forum and the internet for this problem but it seems that most people have consistent uploading problems, not just on one device type with a sketch bigger than 28k.

Thanks guys!

marc
Freetronics Staff
Freetronics Staff
Posts: 16
Joined: Sat Oct 15, 2011 12:54 pm

Re: Upload fails (programmer not responding) when sketch > 2

Post by marc » Mon Apr 30, 2012 1:13 am

Hi tobiw,

Welcome to the forum! :)

Recently there was an updated bootloader for the ATmega328P based Arduino boards, which includes the Uno, Eleven, EtherTen, USBDroid, etc. It specifically fixes the 28k issue, there's a lot more info out there googling for "arduino bootloader size limit fix" or similar.

Attached is a package of the updated bootloader image file and a batch file we use with avrdude and a USBasp programmer to load it. There's quite a few ways to reload this bootloader either by avrdude and a programmer like the USBasp, AVR ISP mk II, or another board can also be used as a programmer.

Hope this helps, let us know if we can assist more too.

Cheers,
Marc
Attachments
ATmega328P_bootloader_update_March_2012.zip
Updated ATmega328P bootloader image, with flash script
(136.58 KiB) Downloaded 441 times

tobiw
Posts: 2
Joined: Wed Apr 25, 2012 10:18 pm

Re: Upload fails (programmer not responding) when sketch > 2

Post by tobiw » Mon Apr 30, 2012 10:32 pm

Hi Marc,

thanks, that really helps. I have to see if I'll be able to load a new bootloader anytime soon, I think I need a programmer board or an Arduino without chip for that, right? At least I now have a good explanation for why it's failing at smaller sizes than expected.

jebz
Posts: 33
Joined: Sun Feb 12, 2012 10:58 pm

Re: Upload fails (programmer not responding) when sketch > 2

Post by jebz » Fri Jun 15, 2012 2:48 pm

I'm currently getting an error when uploading to an EtherTen board -
Binary sketch size: 29532 bytes (of a 32256 byte maximum)
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync
I've got a couple of EtherTen boards. One now has the Arduino as the programmer programmed into it. Can you please provide a guide using the .bin file provided in the zip file to reprogram the boot loader.

jebz
Posts: 33
Joined: Sun Feb 12, 2012 10:58 pm

Re: Upload fails (programmer not responding) when sketch > 2

Post by jebz » Sun Jun 17, 2012 3:21 am

I've found a streamlined way to update the bootloader at - https://github.com/WestfW/OptiLoader You need to program this project into a device and it will then enable reprogramming of the boot loader in another target board. The connections are as per the Arduino ISP sketch - http://arduino.cc/en/Tutorial/ArduinoISP
:idea:

Post Reply