X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/fnordlicht-mini/blobdiff_plain/185257f0a2d4a7b3c35c15b0cd6d4b3d6b0cdf56..7c1ca40f7dbbba4687f715fa65718924352c893a:/firmware/fnordlicht-firmware/Makefile diff --git a/firmware/fnordlicht-firmware/Makefile b/firmware/fnordlicht-firmware/Makefile index 10f1022..4b1167a 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,11 @@ 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 $< $@