File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11CFLAGS =-Wall -Wextra -Werror=overflow -Werror=type-limits -std=c11 -Os -I src/usb-iface -I src/lib
2+ PROGRAMMER =avrispmkii
23
34# Optionally add <prog>.hex here so it is built when make is invoked
45# without arguments.
@@ -11,13 +12,13 @@ all: swsh.hex usb-iface.hex
1112src/swsh.elf : src/swsh/swsh.o src/lib/automation.o src/lib/automation-utils.o src/lib/user-io.o
1213
1314flash-% : % .hex
14- avrdude -p atmega328p -c avrispmkii -P usb -U flash:w:$< :i
15+ avrdude -p atmega328p -c $( PROGRAMMER ) -P usb -U flash:w:$< :i
1516
1617flash-usb-iface : usb-iface.hex
17- avrdude -p m16u2 -c avrispmkii -P usb -U flash:w:$< -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m
18+ avrdude -p m16u2 -c $( PROGRAMMER ) -P usb -U flash:w:$< -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m
1819
1920restore-usb-iface : UNO-dfu_and_usbserial_combined.hex
20- avrdude -p m16u2 -c avrispmkii -P usb -U flash:w:$< -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m
21+ avrdude -p m16u2 -c $( PROGRAMMER ) -P usb -U flash:w:$< -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m
2122
2223usb-iface.hex : lufa/.git src/usb-iface/usb-iface.c src/usb-iface/standalone-usb-iface.c src/usb-iface/usb-descriptors.c
2324 $(MAKE ) -C src/usb-iface usb-iface.hex
Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ file, either manually or by running `make flash-usb-iface`.
115115Unplug the programmer and connect it to the main microcontroller’s ISCP header.
116116Flash the ` swsh.hex ` file, either manually or by running ` make flash-swsh ` .
117117
118+ Use any programmer supported by avrdude, ` avrdude -c ? ` , by specifying
119+ ` PROGRAMMER ` when flashing. E.g. ` make PROGRAMMER=usbtiny flash-swsh ` .
120+
118121Factory restore
119122---------------
120123
You can’t perform that action at this time.
0 commit comments