]> git.zerfleddert.de Git - fnordlicht-mini/blobdiff - firmware/fnordlicht-firmware/Makefile
use patcheeprom instead of fixcrc, now
[fnordlicht-mini] / firmware / fnordlicht-firmware / Makefile
index c18e3ba96a554819aaa36b21092a9f297d62876a..4b1167aef386577ba80c88150ca8d9655727ba69 100644 (file)
@@ -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,14 @@ program-eeprom-%: %.eep.hex
 %.eep.hex: %.elf
        $(OBJCOPY) --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex -j .eeprom $< $@
 
+NODEID ?= 1
+
+%.bincs: %.bin
+       ../tools/patcheeprom $(NODEID) < $< > $@
+
+%.eep.bin: %.elf
+       $(OBJCOPY) --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O binary -j .eeprom $< $@
+
 %.lss: %.elf
        $(OBJDUMP) -h -S $< > $@
 
Impressum, Datenschutz