Yeek!
There's a couple things you can do to fix it
1) if you have a AVR programmer, use avrdude to run this command "avrdude -c usbtiny -p m644 -u -U lock:w:0x2F:m" and replace usbtiny with whatever programmer you've got. Then double check by running "avrdude -c usbtiny -p m644 -u -U lock:v:0x2F:m" which will verify it
2) If you dont have an AVR programmer, edit avrdude.conf (for windows it sits somewhere around C:\WinAVR\bin but you may have to 'find file' if you're not sure)
Scroll down/search until you find the part that says
- Code: Select all
#------------------------------------------------------------
# ATmega644
#------------------------------------------------------------
# similar to ATmega164
then scroll down a little more until you find the part that says
- Code: Select all
memory "flash"
paged = yes;
size = 65536;
page_size = 256;
num_pages = 256;
min_write_delay = 4500;
and replace that with
- Code: Select all
memory "flash"
paged = yes;
size = 63488;
page_size = 256;
num_pages = 248;
min_write_delay = 4500;
note that size has been changed to 63488, which takes out the 2K the bootloader uses, and num_pages is now 248. Then save the file. This will prevent you from overwriting the bootloader by restricting the programming software.
If you already 'bricked' your chip by overwriting the bootloader, and have no way of fixing it (because you dont own any sort of AVR programmer) please email support@adafruit.com so we can get you a replacement!
thanks!

