diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 7 |
2 files changed, 7 insertions, 1 deletions
@@ -8,3 +8,4 @@ *.aux *.log *.pdf +eeprom @@ -11,13 +11,18 @@ CFLAGS_LD=-Wl,-T,avr4-signature.x CFLAGS=${CFLAGS_WARN} ${CFLAGS_OPT} ${CFLAGS_LD} MCU_door=48 MCU_lightctrl=88 +AVRDUDE=avrdude love: $(foreach target,$(TARGETS),$(target).elf) avr-size $^ ifdef TARGET flash: ${TARGET}.flash - avrdude -p m$(MCU_$(basename $<)) -c stk500v2 -P avrdoper -y -U flash:w:$< + $(AVRDUDE) -p m$(MCU_$(basename $<)) -c stk500v2 -P avrdoper -y \ + -U eeprom:r:eeprom:r + $(AVRDUDE) -p m$(MCU_$(basename $<)) -c stk500v2 -P avrdoper -y \ + -U flash:w:$< \ + -U eeprom:w:eeprom:r else flash: @echo the flash target is available only with TARGET set to something. use e.g. \"make flash TARGET=door\" >&2 |