From a53ed8acc837b17d9e049192c99bbe3293ce660b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 4 Jun 2020 19:57:52 +0800 Subject: [PATCH] add remote run script --- remote_run.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 remote_run.sh diff --git a/remote_run.sh b/remote_run.sh new file mode 100755 index 0000000..8fe4e45 --- /dev/null +++ b/remote_run.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e + +target_host="rpi-4.m-labs.hk" + +while getopts "h:i" opt; do + 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 +rsync target/armv7-none-eabihf/release/experiments $target_host:$target_folder/experiments.elf +ssh $target_host "cd $target_folder; openocd -f zc706.cfg -c 'load_image experiments.elf; resume 0; exit'"