From dcc52fdfc95e9b2621b46a18250051234891f563 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 3 Nov 2018 16:00:15 -0600 Subject: Renamed flash/build scripts to better indicate MCU type. --- bin/flash.sh | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 bin/flash.sh (limited to 'bin/flash.sh') diff --git a/bin/flash.sh b/bin/flash.sh deleted file mode 100755 index 9c2ef82..0000000 --- a/bin/flash.sh +++ /dev/null @@ -1,3 +0,0 @@ -#/bin/sh -FIRMWARE=$1 -avrdude -c usbasp -p t13 -u -Uflash:w:$FIRMWARE -Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m -- cgit v1.2.3 From 1756b0beae04f04b6072fcfd2bbe10fb2b4dd116 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 3 Nov 2018 16:41:45 -0600 Subject: added a wrapper to flash fuses and firmware at the same time, like the old scripts did --- bin/flash.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/flash.sh (limited to 'bin/flash.sh') 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" -- cgit v1.2.3 From f58d398e0d8889dac90f533b8099a328e7792802 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 3 Nov 2018 16:47:44 -0600 Subject: Added a help message to build.sh and flash.sh --- bin/flash.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bin/flash.sh') diff --git a/bin/flash.sh b/bin/flash.sh index 019631a..0423c90 100755 --- a/bin/flash.sh +++ b/bin/flash.sh @@ -2,6 +2,13 @@ # Flashes both fuses and firmware. +if [ -z "$1" ]; then + echo "Usage: flash.sh MCU myprogram[.hex]" + echo "MCU is a number, like '13' for attiny13 or '841' for attiny841" + echo "The .hex suffix is optional." + exit +fi + set -e BASEDIR=$(dirname "$0") -- cgit v1.2.3