diff options
Diffstat (limited to '')
| -rw-r--r-- | README | 23 | ||||
| -rwxr-xr-x | bin/build.sh | 11 |
2 files changed, 31 insertions, 3 deletions
@@ -115,3 +115,26 @@ build Crescendo for an attiny25-based driver and then flash it: ../../bin/flash-tiny25.sh crescendo.hex Other useful tools are in bin/ too, so they might be worth a look. + + +ATtiny Series 1 (tiny1616) Support +================================== + +As of early 2021, the Debian packages for gcc-avr and avrdude do not include +support for the Tiny1 series chips. Extra steps are required to get these +working. + + - Download the Atmel ATtiny Series Device Support pack: + http://packs.download.atmel.com/ + + - Unzip the pack somewhere on your build computer + + - Set ATTINY_DFP=/path/to/where/you/unzipped/the/pack + (either in your shell, or in this repo's bin/build.sh script) + + - Make sure you're using gcc-avr 1:5.4.0+Atmel3.6.2 or newer. + 3.6.1 will not work. It gives errors like: + /usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x80381e of anduril.elf section `.data' is not within region `data' + This requires debian/bullseye or newer; buster has 3.6.1. + +This should at least allow the code to compile. 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 |
