Skip to content

Commit

Permalink
itsybitsy-snek: Add '-quick' mode to snek-itsybitsy-install
Browse files Browse the repository at this point in the history
This disables the verify step and saves time during install.

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed May 21, 2019
1 parent b90d605 commit 8532164
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion itsybitsy-snek/Makefile
Expand Up @@ -132,7 +132,7 @@ snek-itsybitsy-install: snek-itsybitsy-install.in
ISP=avrisp2

load: $(HEX) snek-itsybitsy-install
./snek-itsybitsy-install -isp $(ISP) -hex $(HEX) load
./snek-itsybitsy-install -quick -isp $(ISP) -hex $(HEX) load

install: snek-itsybitsy-install $(HEX) snek-itsybitsy-install.1
install -d $(DESTDIR)$(BINDIR)
Expand Down
11 changes: 8 additions & 3 deletions itsybitsy-snek/snek-itsybitsy-install.in
Expand Up @@ -10,6 +10,8 @@ ISP=usbtiny

mode=arg

verify=""

for i in "$@"; do
case "$mode" in
arg)
Expand All @@ -23,6 +25,9 @@ for i in "$@"; do
-hex|--hex)
mode=hex
;;
-quick)
verify="-V"
;;
*)
echo "Usage: $0 {-isp usbtiny} {-isp avrisp2} {-hex itsybitsy-snek.hex} {fuseload|load|fuse}" 1>&2
exit 1
Expand All @@ -44,12 +49,12 @@ FUSES="-U lfuse:w:0xff:m -U hfuse:w:0x91:m -U efuse:w:0xfd:m"

case "$action" in
fuse)
avrdude -c $ISP -p m32u4 $FUSES
avrdude $verify -c $ISP -p m32u4 $FUSES
;;
fuseload)
avrdude -c $ISP -p m32u4 $FUSES -U flash:w:"${SNEKITSYBITSY}"
avrdude $verify -c $ISP -p m32u4 $FUSES -U flash:w:"${SNEKITSYBITSY}"
;;
load)
avrdude -c $ISP -p m32u4 -U flash:w:"${SNEKITSYBITSY}"
avrdude $verify -c $ISP -p m32u4 -U flash:w:"${SNEKITSYBITSY}"
;;
esac

0 comments on commit 8532164

Please sign in to comment.