aboutsummaryrefslogtreecommitdiff
path: root/bin/flash.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/flash.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/flash.sh b/bin/flash.sh
new file mode 100755
index 0000000..019631a
--- /dev/null
+++ b/bin/flash.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Flashes both fuses and firmware.
+
+set -e
+
+BASEDIR=$(dirname "$0")
+export ATTINY=$1 ; shift
+export PROGRAM=$1 ; shift
+if [ ! -f "$PROGRAM" ]; then PROGRAM="$PROGRAM".hex ; fi
+$BASEDIR/flash-tiny"$ATTINY"-fuses.sh
+$BASEDIR/flash-tiny"$ATTINY".sh "$PROGRAM"