I think i may have a bad chip or something, but i can't seem to upload my sketch when it grows to greater than 28674 bytes. I'm using Arduino 022 on MacOS.
If the sketch is 28674 or fewer bytes, i see the normal upload message:
Binary sketch size: 28674 bytes (of a 32256 byte maximum)
and the code seems to work ok.
If the sketch grows to 28676 bytes, I see this:
Binary sketch size: 28676 bytes (of a 32256 byte maximum)
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x54
avrdude: failed to write flash memory, rc=-4
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x61
And the arduino doesn't run the code at all.
If the sketch gets much bigger than 28680, i see:
Binary sketch size: 28700 bytes (of a 32256 byte maximum)
avrdude: stk500_recv(): programmer is not responding
I originally thought it was something in my code, but I can get this problem to occur by changing the length of strings (such as within a "Serial.print()" call).
For example, if i have a sketch that compiles to 28674 bytes (and works ok), changing:
Serial.print ( "12345" );
Serial.print ( "123456" );
Will cause the sketch size to be 28676 bytes, and the problem will occur.
The error message seems to indicate there's a problem with the Flash space on the chip, but i'm not sure. Do I have any recourse here (other than to get a new board or chip?)