mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-12-12 10:13:20 +00:00
Initial check-in for STM32 board
This commit is contained in:
21
BootLoaders/Boards/stm32/tools/macosx/upload_router
Normal file
21
BootLoaders/Boards/stm32/tools/macosx/upload_router
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/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/local/bin/dfu-util
|
||||
if [ ! -x ${DFU_UTIL} ]; then
|
||||
DFU_UTIL=/opt/local/bin/dfu-util
|
||||
fi
|
||||
|
||||
if [ ! -x ${DFU_UTIL} ]; then
|
||||
echo "$0: error: cannot find ${DFU_UTIL}" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile}
|
||||
Reference in New Issue
Block a user