diff options
Diffstat (limited to 'fw/fe310/bsp/upload')
-rwxr-xr-x | fw/fe310/bsp/upload | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fw/fe310/bsp/upload b/fw/fe310/bsp/upload index a52fc0a..120a72a 100755 --- a/fw/fe310/bsp/upload +++ b/fw/fe310/bsp/upload @@ -14,7 +14,8 @@ do case "$1" in --elf) elf="$2"; shift 2;; - --hex) hex="$2"; shift 2;; + --bin) bin="$2"; shift 2;; + --addr) addr="$2"; shift 2;; --openocd) openocd="$2"; shift 2;; --openocd-config) cfg="$2"; shift 2;; --jlink) jlink="$2"; shift 2;; @@ -23,9 +24,9 @@ do esac done -if [ "$elf" == "" -a "$hex" == "" ] +if [ "$elf" == "" -a "$bin" == "" ] then - echo "$0: --elf or --hex is required" >&2 + echo "$0: --elf or --bin is required" >&2 exit 1 fi @@ -34,7 +35,7 @@ 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 +echo -e "loadfile $bin $addr\nrnh\nexit" | $jlink -device FE310 -if JTAG -speed 4000 -jtagconf -1,-1 -autoconnect 1 else |