1
0
Fork 0
artiq-zynq/remote_run.sh

31 lines
730 B
Bash
Raw Normal View History

2020-04-11 21:12:16 +08:00
#!/usr/bin/env bash
set -e
target_host="rpi-4.m-labs.hk"
impure=0
2020-04-11 21:12:16 +08:00
while getopts "h:i" opt; do
case "$opt" in
\?) exit 0
;;
h) target_host=$OPTARG
;;
i) impure=1
;;
esac
done
2020-04-11 21:12:16 +08:00
target_folder=/tmp/zynq-\$USER
ssh $target_host "mkdir -p $target_folder"
rsync openocd/* $target_host:$target_folder
if [ $impure -eq 1 ]; then
rsync src/target/armv7-none-eabihf/release/szl $target_host:$target_folder
rsync src/build/top.bit $target_host:$target_folder
else
rsync result/szl $target_host:$target_folder
rsync result/top.bit $target_host:$target_folder
fi
ssh $target_host "cd $target_folder; openocd -f zc706.cfg -c 'pld load 0 top.bit; load_image szl; resume 0; exit'"