2020-06-04 19:57:52 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
target_host="rpi-4.m-labs.hk"
|
|
|
|
|
2020-11-18 17:45:43 +08:00
|
|
|
while getopts "h:" opt; do
|
2020-06-04 19:57:52 +08:00
|
|
|
case "$opt" in
|
|
|
|
\?) exit 0
|
|
|
|
;;
|
|
|
|
h) target_host=$OPTARG
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
target_folder=/tmp/zynq-\$USER
|
|
|
|
|
|
|
|
ssh $target_host "mkdir -p $target_folder"
|
|
|
|
rsync openocd/* $target_host:$target_folder
|
2023-02-08 12:45:35 +08:00
|
|
|
rsync target/armv7a-none-eabihf/release/experiments $target_host:$target_folder/experiments.elf
|
2020-06-04 19:57:52 +08:00
|
|
|
ssh $target_host "cd $target_folder; openocd -f zc706.cfg -c 'load_image experiments.elf; resume 0; exit'"
|