Did you start with the version that claims to sort-of-support the 644?
I used v3 which is the latest version on the google code website. I didn't see anything about it which had 644-specific code in it.
Exactly what changes did you make?
All I did was add some #ifdef's for the chip type, to set the proper LED #defines. Also, I modified the Makefile to put in the specific particulars about this build version (defining the CPU type, freq., etc.)
What fuses are you using...
I changed the boot select fuse to put the boot start address at 0x7e00 (which matches the Makefile changes I made). The fuse settings are: EXTENDED=0xFF; HIGH=0xDE; LOW=0xE2. Also, LOCKBITS=0xFF (everything unlocked).
... and what compile command?
Here is the output from the make command:
avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -mmcu=atmega644 -DF_CPU=8000000L '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' -c -o optiboot.o optiboot.c
avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -mmcu=atmega644 -DF_CPU=8000000L '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' -Wl,--section-start=.text=0x7e00 -Wl,--relax -nostartfiles -o optiboot_atmega644_pro_8MHz.elf optiboot.o
avr-objcopy -j .text -j .data -O ihex optiboot_atmega644_pro_8MHz.elf optiboot_atmega644_pro_8MHz.hex
avr-objdump -h -S optiboot_atmega644_pro_8MHz.elf > optiboot_atmega644_pro_8MHz.lst
rm optiboot.o optiboot_atmega644_pro_8MHz.elf
As I said, the bootloader appears to function properly in all aspects, save the actual programming of the FLASH. It flashes the LED at boot, and responds appropriately to avrdude (based on what I could see in the verbose log). I am at a loss why the FLASH programming would be the thing which doesn't work...
Thanks for your help.
-- Steven