aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-11-03 16:17:50 -0600
committerSelene ToyKeeper2018-11-03 16:17:50 -0600
commit4df62bd9d7c3b7bbb9a62ab13b78d7f42da99958 (patch)
treebfbf997267b276e4a1f7a4580ccd63ae7a5d2772 /bin
parentRenamed flash/build scripts to better indicate MCU type. (diff)
downloadanduril-4df62bd9d7c3b7bbb9a62ab13b78d7f42da99958.tar.gz
anduril-4df62bd9d7c3b7bbb9a62ab13b78d7f42da99958.tar.bz2
anduril-4df62bd9d7c3b7bbb9a62ab13b78d7f42da99958.zip
Split flashing scripts into firmware vs fuses, to help prevent accidental bricking.
(some people had errors happen during the fuse parts, and ended up with bricks)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/flash-tiny13-fuses.bat1
-rwxr-xr-xbin/flash-tiny13-fuses.sh8
-rwxr-xr-xbin/flash-tiny13.bat2
-rwxr-xr-xbin/flash-tiny13.sh2
-rwxr-xr-xbin/flash-tiny25-fuses.sh8
-rwxr-xr-xbin/flash-tiny25.sh3
-rwxr-xr-xbin/flash-tiny85-fuses.sh8
-rwxr-xr-xbin/flash-tiny85.sh3
8 files changed, 29 insertions, 6 deletions
diff --git a/bin/flash-tiny13-fuses.bat b/bin/flash-tiny13-fuses.bat
new file mode 100755
index 0000000..cec982e
--- /dev/null
+++ b/bin/flash-tiny13-fuses.bat
@@ -0,0 +1 @@
+avrdude -c usbasp -p t13 -u -Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m
diff --git a/bin/flash-tiny13-fuses.sh b/bin/flash-tiny13-fuses.sh
new file mode 100755
index 0000000..fe479a8
--- /dev/null
+++ b/bin/flash-tiny13-fuses.sh
@@ -0,0 +1,8 @@
+#/bin/sh
+# 4.8 MHz (~4.0 MHz actual), 4ms boot delay, enable flashing
+# (everything else disabled)
+# Use low fuse 0x75 for 4ms startup delay,
+# or 0x79 for 64ms (useful on a twisty light)
+avrdude -c usbasp -p t13 -u -Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m
+
+# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny13A&P=ATtiny13A&M_LOW_0x0F=0x05&M_LOW_0x80=0x00&M_HIGH_0x06=0x06&B_SPIEN=P&B_SUT1=P&B_CKSEL1=P&V_LOW=75&V_HIGH=FF&O_HEX=Apply+values
diff --git a/bin/flash-tiny13.bat b/bin/flash-tiny13.bat
index 5324ab6..db75fd8 100755
--- a/bin/flash-tiny13.bat
+++ b/bin/flash-tiny13.bat
@@ -1 +1 @@
-avrdude -p t13 -c usbasp -u -Uflash:w:%1.hex:a -Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m
+avrdude -p t13 -c usbasp -u -Uflash:w:%1:a
diff --git a/bin/flash-tiny13.sh b/bin/flash-tiny13.sh
index 9c2ef82..47b2bfe 100755
--- a/bin/flash-tiny13.sh
+++ b/bin/flash-tiny13.sh
@@ -1,3 +1,3 @@
#/bin/sh
FIRMWARE=$1
-avrdude -c usbasp -p t13 -u -Uflash:w:$FIRMWARE -Ulfuse:w:0x75:m -Uhfuse:w:0xFF:m
+avrdude -c usbasp -p t13 -u -Uflash:w:$FIRMWARE
diff --git a/bin/flash-tiny25-fuses.sh b/bin/flash-tiny25-fuses.sh
new file mode 100755
index 0000000..65d5b1d
--- /dev/null
+++ b/bin/flash-tiny25-fuses.sh
@@ -0,0 +1,8 @@
+#/bin/sh
+# 8 MHz, 4ms boot delay, enable flashing
+# (everything else disabled)
+# Use low fuse 0xD2 for 4ms startup delay,
+# or 0xE2 for 64ms (useful on a twisty light)
+avrdude -c usbasp -p t25 -u -U lfuse:w:0xd2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
+
+# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny25&P=ATtiny25&M_LOW_0x3F=0x22&M_HIGH_0x07=0x07&M_HIGH_0x20=0x00&B_SPIEN=P&B_SUT0=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&V_LOW=E2&V_HIGH=DF&V_EXTENDED=FF&O_HEX=Apply+values
diff --git a/bin/flash-tiny25.sh b/bin/flash-tiny25.sh
index 0b24bb2..9975671 100755
--- a/bin/flash-tiny25.sh
+++ b/bin/flash-tiny25.sh
@@ -1,4 +1,3 @@
#/bin/sh
FIRMWARE=$1
-avrdude -c usbasp -p t25 -u -U lfuse:w:0xd2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:$FIRMWARE
-# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny25&P=ATtiny25&M_LOW_0x3F=0x22&M_HIGH_0x07=0x07&M_HIGH_0x20=0x00&B_SUT1=P&B_SPIEN=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&V_LOW=D2&V_HIGH=DF&V_EXTENDED=FF
+avrdude -c usbasp -p t25 -u -Uflash:w:$FIRMWARE
diff --git a/bin/flash-tiny85-fuses.sh b/bin/flash-tiny85-fuses.sh
new file mode 100755
index 0000000..e517b2d
--- /dev/null
+++ b/bin/flash-tiny85-fuses.sh
@@ -0,0 +1,8 @@
+#/bin/sh
+# 8 MHz, 64ms boot delay, enable flashing
+# (everything else disabled)
+# Use low fuse 0xD2 for 4ms startup delay,
+# or 0xE2 for 64ms (useful on a twisty light)
+avrdude -c usbasp -p t85 -u -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
+
+# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny85&P=ATtiny85&M_LOW_0x3F=0x22&M_HIGH_0x07=0x07&M_HIGH_0x20=0x00&B_SPIEN=P&B_SUT0=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&V_LOW=E2&V_HIGH=DF&V_EXTENDED=FF&O_HEX=Apply+values
diff --git a/bin/flash-tiny85.sh b/bin/flash-tiny85.sh
index 8d1636d..0f5a292 100755
--- a/bin/flash-tiny85.sh
+++ b/bin/flash-tiny85.sh
@@ -1,4 +1,3 @@
#/bin/sh
FIRMWARE=$1
-avrdude -c usbasp -p t85 -u -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -Uflash:w:$FIRMWARE
-# http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny85&P=ATtiny85&M_LOW_0x3F=0x22&M_HIGH_0x07=0x06&M_HIGH_0x20=0x00&B_SPIEN=P&B_SUT0=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&B_BODLEVEL0=P&V_LOW=E2&V_HIGH=DE&V_EXTENDED=FF
+avrdude -c usbasp -p t85 -u -Uflash:w:$FIRMWARE
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.