Added files and made changes to support linux upload

This commit is contained in:
Roger Clark 2014-12-30 08:26:50 +11:00
parent 9ead72e0af
commit 850413e13d
3 changed files with 20 additions and 1 deletions

View File

@ -100,9 +100,10 @@ recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
# Upload using Maple bootloader over DFU
tools.maple_upload.cmd=maple_upload
tools.maple_upload.cmd.windows=maple_upload.bat
#tools.maple_upload.cmd.linux=
#tools.maple_upload.cmd.linux=maple_upload ### Added by @Chillitronix
tools.maple_upload.path={runtime.hardware.path}/tools/win
tools.maple_upload.path.macosx={runtime.hardware.path}/tools/macosx
tools.maple_upload.path.linux={runtime.hardware.path}/tools/linux ### Added by @Chillitronix
tools.maple_upload.upload.params.verbose=-d
tools.maple_upload.upload.params.quiet=

17
tools/linux/maple_upload Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -e
if [ $# -lt 4 ]; then
echo "Usage: $0 $# <dummy_port> <altID> <usbID> <binfile>" >&2
exit 1
fi
dummy_port=$1; altID=$2; usbID=$3; binfile=$4
DFU_UTIL=/usr/bin/dfu-util
if [ ! -x ${DFU_UTIL} ]; then
echo "$0: error: cannot find ${DFU_UTIL}" >&2
exit 2
fi
${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile}

1
tools/linux/readme.txt Normal file
View File

@ -0,0 +1 @@
The maple upload script needs its rights to be set to 755