diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-14 09:53:28 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-02-14 10:05:53 +0100 |
commit | a8049bb66f7bc62c9a33488615d0990e0a920520 (patch) | |
tree | 1372e18896897490650203efe72c8244a23204cf /tools/upload.sh | |
parent | 336d968dd2a4473b3acd71cfef86ad47a7901fbc (diff) |
build: add utility scripts
Diffstat (limited to 'tools/upload.sh')
-rw-r--r-- | tools/upload.sh | 12 |
1 files changed, 12 insertions, 0 deletions
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 |