diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-08-05 02:52:42 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-08-05 02:52:42 +0200 |
commit | 0894a1e7664504312a9cdfc826eef89030aaaa1b (patch) | |
tree | 51e37e46d7862437583dbe02e6ebf03997a664be /code/fe310/scripts/upload | |
parent | dff71bc297b744856e303ad9a175de92c9acae0d (diff) |
new directory sructure for fe310 fw
Diffstat (limited to 'code/fe310/scripts/upload')
-rwxr-xr-x | code/fe310/scripts/upload | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/code/fe310/scripts/upload b/code/fe310/scripts/upload deleted file mode 100755 index a52fc0a..0000000 --- a/code/fe310/scripts/upload +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e -set -o pipefail - -unset elf -unset hex -unset cfg -unset openocd -unset jlink -unset gdb -while [[ "$1" != "" ]] -do - case "$1" - in - --elf) elf="$2"; shift 2;; - --hex) hex="$2"; shift 2;; - --openocd) openocd="$2"; shift 2;; - --openocd-config) cfg="$2"; shift 2;; - --jlink) jlink="$2"; shift 2;; - --gdb) gdb="$2"; shift 2;; - *) echo "$0: Unknown argument $1"; exit 1;; - esac -done - -if [ "$elf" == "" -a "$hex" == "" ] -then - echo "$0: --elf or --hex is required" >&2 - exit 1 -fi - -export GDB_PORT=3333 - -if [ "$jlink" != "" ] -then - -echo -e "loadfile $hex\nrnh\nexit" | $jlink -device FE310 -if JTAG -speed 4000 -jtagconf -1,-1 -autoconnect 1 - -else - -$openocd -f $cfg & - -$gdb $elf --batch -ex "set remotetimeout 240" -ex "target extended-remote localhost:${GDB_PORT}" -ex "monitor reset halt" -ex "monitor flash protect 0 64 last off" -ex "load" -ex "monitor resume" -ex "monitor shutdown" -ex "quit" - -kill %1 - -fi |