diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |