From: gitknilch <gitknilch@cwde.de>
Date: Fri, 25 Mar 2011 13:50:13 +0000 (+0100)
Subject: add eeprom writing (including checksum)
X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/fnordlicht-mini/commitdiff_plain/06e73f0938d98d18d62a0bd054334d795d29e31a?ds=inline;hp=71bf23cb3cb29253587b4d91bf947a81b008beb2

add eeprom writing (including checksum)
---

diff --git a/firmware/fnordlicht-firmware/Makefile b/firmware/fnordlicht-firmware/Makefile
index 10f1022..345a4c1 100644
--- a/firmware/fnordlicht-firmware/Makefile
+++ b/firmware/fnordlicht-firmware/Makefile
@@ -196,8 +196,8 @@ avrdude-terminal:
 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
@@ -216,6 +216,9 @@ program-eeprom-%: %.eep.hex
 %.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 $< $@