diff options
| author | Selene ToyKeeper | 2021-04-01 17:12:06 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2021-04-01 17:12:06 -0600 |
| commit | 757eb4836b733821d84b3941f9ee56c42810296e (patch) | |
| tree | f41966eab7c0832298092ddcbf8e07b3125a1166 /bin/build.sh | |
| parent | merged gchart's Tiny1 series branch for tiny1616 support (diff) | |
| download | anduril-757eb4836b733821d84b3941f9ee56c42810296e.tar.gz anduril-757eb4836b733821d84b3941f9ee56c42810296e.tar.bz2 anduril-757eb4836b733821d84b3941f9ee56c42810296e.zip | |
Added attiny1616 info to the README, and made bin/build.sh support more flexible.
Set ATTINY_DFP environment variable in your shell to the location of the unzipped DFP files.
Diffstat (limited to '')
| -rwxr-xr-x | bin/build.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/build.sh b/bin/build.sh index 6c21e30..c733320 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -11,12 +11,17 @@ fi export ATTINY=$1 ; shift export PROGRAM=$1 ; shift + +# path to the 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 + export MCU=attiny$ATTINY -export DFP=~/avr/attiny_dfp export CC=avr-gcc export OBJCOPY=avr-objcopy -export CFLAGS="-Wall -g -Os -mmcu=$MCU -c -std=gnu99 -fgnu89-inline -fwhole-program -DATTINY=$ATTINY -I.. -I../.. -I../../.. -fshort-enums -B $DFP/gcc/dev/$MCU/ -I $DFP/include/" -export OFLAGS="-Wall -g -Os -mmcu=$MCU -B $DFP/gcc/dev/$MCU/ -I $DFP/include/" +export DFPFLAGS="-B $ATTINY_DFP/gcc/dev/$MCU/ -I $ATTINY_DFP/include/" +export CFLAGS="-Wall -g -Os -mmcu=$MCU -c -std=gnu99 -fgnu89-inline -fwhole-program -DATTINY=$ATTINY -I.. -I../.. -I../../.. -fshort-enums $DFPFLAGS" +export OFLAGS="-Wall -g -Os -mmcu=$MCU $DFPFLAGS" export LDFLAGS="-fgnu89-inline" export OBJCOPYFLAGS='--set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex' export OBJS=$PROGRAM.o |
