program-%: %.hex
$(AVRDUDE) $(AVRDUDE_FLAGS) -c $(PROG) -P $(DEV) -U flash:w:$<
-program-eeprom-%: %.eep.hex
- $(AVRDUDE) $(AVRDUDE_FLAGS) -c $(PROG) -P $(DEV) -U eeprom:w:$<
+program-eeprom-%: %.eep.bincs
+ $(AVRDUDE) $(AVRDUDE_FLAGS) -c $(PROG) -P $(DEV) -U eeprom:w:$<:r
# special programming targets
%.hex: %.elf
%.eep.hex: %.elf
$(OBJCOPY) --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex -j .eeprom $< $@
+%.bincs: %.bin
+ ../tools/fixcrc < $< > $@
+
%.eep.bin: %.elf
$(OBJCOPY) --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O binary -j .eeprom $< $@