My sketch is around 28,900 bytes on an Arduino Uno compatible (USBdroid) which has only 32,256 bytes of program memory space.
32,768 bytes of program memory, more like
I recommend having a bash at (2).
Some of blog posts about optimizing code:http://liudr.wordpress.com/2011/02/04/how-to-optimize-your-arduino-memory-usage/http://liudr.wordpress.com/2011/03/07/optimizing-your-program/If you are using a lot of strings for serial comm, cut them down, way down
BTW it's working now because I've whittled about 2.5Kbytes of code out. It seems usable limit is about 28,600. Curious: what's between here and 32,256 ?
If my sketch is below about 28,600 it compiles and works fine but if I add more code and it gets above this I get an error message "Problem uploading to board" plusavrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64avrdude: stk500_cmd(): programmer is out of sync
Here's a possibility ...You have "told" the programmer (via the boards.txt files) that you have the new 512 byte bootloader (hence the message about 32,256 of bytes of memory available). However you actually have a 2048 byte bootloader, and the fuses on the board are set appropriately. So when you try to upload, the bootloader tries to overwrite itself, fails, and generates that message.
Quite plausible. Does arduino check fuse settings before uploading?