From a8049bb66f7bc62c9a33488615d0990e0a920520 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Feb 2022 09:53:28 +0100 Subject: build: add utility scripts --- tools/upload.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/upload.sh (limited to 'tools/upload.sh') diff --git a/tools/upload.sh b/tools/upload.sh new file mode 100644 index 0000000..eddf4de --- /dev/null +++ b/tools/upload.sh @@ -0,0 +1,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 -- cgit v1.2.3-18-g5258