summaryrefslogtreecommitdiff
path: root/tools/upload.sh
blob: eddf4dec6ca58445b4b6be663c7873f16b253a3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

DEVICE_PATH=$1
PYTHON_CMD=$2
AVRDUDE=$3
AVRDUDE_COM_OPTS=$4
AVRDUDE_ARD_OPTS=$5
AVRDUDE_UPLOAD_HEX=$6

new_port=$($PYTHON_CMD ./tools/reset.py $DEVICE_PATH 2> /dev/tty)

$AVRDUDE $AVRDUDE_COM_OPTS $AVRDUDE_ARD_OPTS $new_port $AVRDUDE_UPLOAD_HEX