From 5f709d529d33d9f0869c944b52bfc6e7218ee919 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 22 Jul 2021 10:13:14 -0600 Subject: give a more useful error message when t1616 files aren't installed --- bin/build.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/build.sh b/bin/build.sh index c733320..aa983c8 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -12,9 +12,18 @@ fi export ATTINY=$1 ; shift export PROGRAM=$1 ; shift -# path to the Atmel ATtiny device family pack: (for attiny1616 support) +# give a more useful error message when AVR DFP is needed but not installed +# (Atmel ATtiny device family pack, for attiny1616 support) # http://packs.download.atmel.com/ -if [ -z "$ATTINY_DFP" ]; then export ATTINY_DFP=~/avr/attiny_dfp ; fi +#if [ -z "$ATTINY_DFP" ]; then export ATTINY_DFP=~/avr/attiny_dfp ; fi +SERIES1=' 416 417 816 817 1616 1617 3216 3217 ' +if [[ $SERIES1 =~ " $ATTINY " ]]; then + if [ -z "$ATTINY_DFP" ]; then + echo "ATtiny$ATTINY support requires Atmel attiny device family pack." + echo "More info is in /README under tiny1616 support." + exit 1 + fi +fi export MCU=attiny$ATTINY export CC=avr-gcc -- cgit v1.2.3