-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-bootloader.sh
More file actions
34 lines (30 loc) · 928 Bytes
/
Copy pathinstall-bootloader.sh
File metadata and controls
34 lines (30 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -x
MCU=attiny85
AVRDUDE="avrdude -c usbtiny -p $MCU -B 32"
function dump-firmware() {
NAME=trinket3V_backup_$(date +%F)
# $AVRDUDE -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h
$AVRDUDE -U lfuse:r:${NAME}.lfuse.hex:i \
-U hfuse:r:${NAME}.hfuse.hex:i \
-U efuse:r:${NAME}.efuse.hex:i \
-U flash:r:${NAME}.flash.hex:i \
-U eeprom:r:${NAME}.eeprom.hex:i
}
function first-time-install-micronucleos() {
cd micronucleus/firmware
# while (true); do
make PROGRAMMER='-c usbtiny' fuse && break
# sleep 5
# done
#
#2022-09-04 only failed because i didn't connect Vcc...
# while (true); do
make PROGRAMMER='-c usbtiny' flash && break
# sleep 5
# done
# ../commandline/micronucleus --run upgrade.hex
echo "initial installation of micronucleos done"
}
#dump-firmware()
first-time-install-micronucleos