Skip to content

Commit

Permalink
Skip a target compilation ONLY if avr-gcc does not support it
Browse files Browse the repository at this point in the history
  • Loading branch information
drizzt committed Oct 20, 2010
1 parent ff363d4 commit 9069618
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions build_hex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@
all_targets="teensy1 teensypp1 teensy2 teensypp2 \
at90usbkey minimus1 minimus32 maximus \
blackcat xplain olimex usbtinymkii \
bentio"
bentio openkubus"

avr_gcc_ver=`avr-gcc --version | head -n 1 | awk '{print $3}'`
if [[ $avr_gcc_ver < "4.3.5" ]]; then
echo "OpenKubus compilation disabled. You need avr-gcc version 4.3.5 or later."
echo "(You currently have avr-gcc version ${avr_gcc_ver})"
else
all_targets="${all_targets} openkubus"
fi
function is_mcu_supported() {
avr-gcc --target-help | awk '/^Known MCU names:$/,/^$/' | grep -q $1
}

i=1
for target in ${all_targets}; do
Expand Down Expand Up @@ -119,6 +115,10 @@ mkdir psgroove_hex
$MAKE clean_list > /dev/null

for target in ${targets}; do
if ! is_mcu_supported "${mcu[${!target}]}"; then
echo "$target compilation skipped. Your avr-gcc does not support ${mcu[${!target}]}." >&2
continue
fi
for firmware in 3.01 3.10 3.15 3.41 ; do
firmware=${firmware/./_}
low_board=`echo ${board[${!target}]} | awk '{print tolower($0)}'`
Expand Down

0 comments on commit 9069618

Please sign in to comment.