Skip to content

Commit b8a33cb

Browse files
committed
It seems that we MUST have an avrdude.conf if we use our own programmer, even if we wanted to use the built in one.
So now avrdude.local.conf includes an "include" statement, and sources.sh will copy that referenced file into avrdude.conf
1 parent 15c02c1 commit b8a33cb

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# This file is not currently used, the default avrdude.conf in the Arduino IDE is now suitable.
2-
# (From IDE 1.6.13+)
1+
# This file is used to create avrdude.conf.
32
#
4-
# Distributors: if necessary, put custom avrdude.conf in here and rebuild the distribution
5-
# sources.sh will find it and create a suitable programmers.txt as necessary
3+
# Distributors: if necessary remove the include and put custom avrdude.conf
4+
# in here and rebuild the distribution. Currently 1.6.13 looks like it
5+
# has a usable avrdude.conf
6+
#
7+
#include "/usr/local/stow/arduino-1.6.13/hardware/tools/avr/etc/avrdude.conf"

dists/diy_attiny/avr/sources.sh

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,31 @@ version=${VERSION}
6666
# Not using a custom avrdude.conf
6767
rm -f avrdude.conf programmers.txt
6868
cp programmers.local.txt programmers.txt
69+
70+
# Our platform.txt will also need modification to set the avrdude.conf back to the builtin
71+
# cat platform.txt | sed -r 's/\{runtime.platform.path\}\/avrdude.conf/{path}\/avrdude.conf/' >platform.tmp.txt
72+
# mv platform.tmp.txt platform.txt
73+
74+
# Nope changing the path doesn't work, apparently, if we have our own programmers we MUST have our own
75+
# avrdude.conf, so copy it in place from arduino. This whole configuration system is an inconsistent mess.
76+
# The local file will include some other since it isnt an avrdude.conf itself
77+
cat >avrdude.conf <<EOF
78+
###############################################################################
79+
#
80+
# This file was copied from
81+
# $(grep -F "#include" avrdude.local.conf | sed -r 's/.*"(.*)".*/\1/')
82+
# as a result of avrdude.local.conf including it.
83+
#
84+
# DO NOT EDIT THIS FILE
85+
# Edit avrdude.local.conf and then recreate the distribution (or ./sources.sh)
86+
#
87+
###############################################################################
88+
89+
90+
91+
EOF
92+
cat $(grep -F "#include" avrdude.local.conf | sed -r 's/.*"(.*)".*/\1/') >>avrdude.conf
6993

70-
# Out platform.txt will also need modification to set the avrdude.conf back to the builtin
71-
cat platform.txt | sed -r 's/\{runtime.platform.path\}\/avrdude.conf/{path}\/avrdude.conf/' >platform.tmp.txt
72-
mv platform.tmp.txt platform.txt
7394
fi
7495

7596
}

0 commit comments

Comments
 (0)