Commit 0334488f authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Make .Verify check fuses also

parent 5b1f8c39
......@@ -23,6 +23,9 @@ all:
%.LOAD:
make -C $$(./tools/find_avr_targets $*) $@
%.VERIFY:
make -C $$(./tools/find_avr_targets $*) $@
%.FUSE:
make -C $$(./tools/find_avr_targets $*) $@
......
......@@ -62,7 +62,7 @@ OBJECTS=$($(1).C:%=compiled/$(1)/%.o)
--erase \
--upload if=compiled/$(TARGET)/$*.sr
%.VERIFY: compiled/$(TARGET)/%.sr
%.VERIFY: %.VERIFY_FUSE compiled/$(TARGET)/%.sr
avrdude -P usb -c avrisp2 -p $(CHIP) \
-U flash:v:compiled/$(TARGET)/$*.sr:s
......@@ -70,6 +70,29 @@ OBJECTS=$($(1).C:%=compiled/$(1)/%.o)
avrdude -P usb -c avrisp2 -p $(CHIP) \
-U flash:w:compiled/$(TARGET)/$*.sr:s
%.VERIFY_FUSE:
@if [ -n "$($(TARGET).FUSE_L)" ] ; then \
echo avrdude -P usb -c avrisp2 -p $(CHIP) \
-U lfuse:v:$($(TARGET).FUSE_L):m >&2 \
; avrdude -qq -P usb -c avrisp2 -p $(CHIP) \
-U lfuse:v:$($(TARGET).FUSE_L):m \
|| (echo "failed to program FUSE_L with $($(TARGET).FUSE_L)" >&2 && exit 1) \
; fi
@if [ -n "$($(TARGET).FUSE_H)" ] ; then \
echo avrdude -P usb -c avrisp2 -p $(CHIP) \
-U hfuse:v:$($(TARGET).FUSE_H):m >&2 \
; avrdude -qq -P usb -c avrisp2 -p $(CHIP) \
-U hfuse:v:$($(TARGET).FUSE_H):m \
|| (echo "failed to program FUSE_H with $($(TARGET).FUSE_H)" >&2 && exit 1) \
; fi
@if [ -n "$($(TARGET).FUSE_E)" ] ; then \
echo avrdude -P usb -c avrisp2 -p $(CHIP) \
-U efuse:v:$($(TARGET).FUSE_E):m >&2 \
; avrdude -qq -P usb -c avrisp2 -p $(CHIP) \
-U efuse:v:$($(TARGET).FUSE_E):m \
|| (echo "failed to program FUSE_E with $($(TARGET).FUSE_E)" >&2 && exit 1) \
; fi
%.FUSE:
@if [ -n "$($(TARGET).FUSE_L)" ] ; then \
echo avrdude -P usb -c avrisp2 -p $(CHIP) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment