115
115
../../bin/flash-tiny25.sh crescendo.hex
117
117
Other useful tools are in bin/ too, so they might be worth a look.
120
ATtiny Series 1 (tiny1616) Support
121
==================================
123
In Feb 2022, avr-libc merged in new devices from Atmel's DFP (Device Family
124
Pack). Depending on how recent your avr-libc package is, support may already
125
be included. If not, the info below applies:
127
As of early 2021, the Debian packages for gcc-avr and avrdude do not include
128
support for the Tiny1 series chips. Extra steps are required to get these
131
- Download the Atmel ATtiny Series Device Support pack:
132
http://packs.download.atmel.com/
134
- Unzip the pack somewhere on your build computer
136
- Set ATTINY_DFP=/path/to/where/you/unzipped/the/pack
137
(either in your shell, or in this repo's bin/build.sh script)
139
export ATTINY_DFP=$HOME/src/torches/atmel/attiny-dfp
141
- Make sure you're using gcc-avr 1:5.4.0+Atmel3.6.2 or newer.
142
3.6.1 will not work. It gives errors like:
143
/usr/lib/gcc/avr/5.4.0/../../../avr/bin/ld: address 0x80381e of anduril.elf section `.data' is not within region `data'
144
This requires debian/bullseye or newer; buster has 3.6.1.
146
This should at least allow the code to compile.
152
The recommended solution is to use pymcuprog instead of avrdude. Details are
153
still being worked out for how to actually set this up though.
157
Some extra steps are also needed to make flashing (avrdude) work:
159
- Get an AVR jtag2 device.
160
The one I'm using is: "HWAYEH AVR JTAG ICE Version 2.0"
164
- nSRST = R (reset/UPDI)
166
- Flash the jtag2 device with the relevant firmware:
167
https://github.com/ElTangas/jtag2updi/tree/master/tools/avrjtagicev2
169
- Get an avrdude.conf which supports jtag2updi:
171
- Download avrdude.conf from https://github.com/ElTangas/jtag2updi
174
- Or grab the source and set an environment variable:
176
cd ~/src/torches/avrdude
177
git clone https://github.com/ElTangas/jtag2updi
178
export AVRDUDE_CONF="-C$HOME/src/torches/avrdude/jtag2updi/avrdude.conf"
180
- Maybe configure which USB serial port to use too:
181
export AVRDUDE_TTYUSB="/dev/ttyUSB2"
183
Afterward, flashing should work. You may need to unplug and replug the jtag2
184
USB device between uses though, since it may stop responding after each use.