X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/fnordlicht-mini/blobdiff_plain/e06282dce0420369b589ec793c567a8a2cc48603..35e64c002763f6895e3315237e4cb8aa9ce65acc:/firmware/fnordlicht-firmware/Makefile?ds=inline diff --git a/firmware/fnordlicht-firmware/Makefile b/firmware/fnordlicht-firmware/Makefile index c18e3ba..adc475a 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,12 +216,20 @@ 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 $< > $@ -.PHONY: fuses-atmega8-fnordlichtmini-without-bootloader +.PHONY: fuses -fuses-atmega8-fnordlichtmini-without-bootloader: - $(AVRDUDE) $(AVRDUDE_FLAGS) -c $(PROG) -P $(DEV) -U lfuse:w:0x3f:m -U hfuse:w:0xd9:m +fuses: + $(AVRDUDE) $(AVRDUDE_FLAGS) -c $(PROG) -P $(DEV) -U lfuse:w:0x3f:m -U hfuse:w:0xd1:m -include $(shell $(MKDIR) .dep 2>/dev/null) $(wildcard .dep/*)