microduino: Add OS X version of maple_upload script
Currently this is a wrapper around dfu-util; tested with dfu-util-0.7.mpkg, e.g. https://code.google.com/p/companion9x/downloads/detail?name=dfu-util-0.7.mpkg
This commit is contained in:
parent
5546e20d0c
commit
9de8d1d058
|
@ -324,7 +324,7 @@ microduino32_flash.upload.file_type=bin
|
|||
microduino32_flash.upload.ram.maximum_size=17000
|
||||
microduino32_flash.upload.flash.maximum_size=108000
|
||||
microduino32_flash.upload.usbID=1EAF:0003
|
||||
microduino32_flash.upload.altID=0
|
||||
microduino32_flash.upload.altID=1
|
||||
microduino32_flash.upload.auto_reset=true
|
||||
|
||||
|
||||
|
|
|
@ -97,10 +97,12 @@ recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
|
|||
# Uploader tools
|
||||
# -------------------
|
||||
|
||||
# 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.path={runtime.hardware.path}/tools/win
|
||||
tools.maple_upload.path.macosx={runtime.hardware.path}/tools/macosx
|
||||
|
||||
tools.maple_upload.upload.params.verbose=-d
|
||||
tools.maple_upload.upload.params.quiet=
|
||||
|
|
|
@ -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=/opt/local/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}
|
Loading…
Reference in New Issue