From aff7c3a40b5c80232e299a30cf3f0f9a9f861643 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 5 Jun 2020 11:45:56 +0800 Subject: [PATCH] add local run script --- local_run.sh | 21 +++++++++++++++++++++ shell.nix | 1 + 2 files changed, 22 insertions(+) create mode 100755 local_run.sh diff --git a/local_run.sh b/local_run.sh new file mode 100755 index 0000000..b57a8b0 --- /dev/null +++ b/local_run.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e + +impure=0 + +while getopts "h:i" opt; do + case "$opt" in + \?) exit 0 + ;; + i) impure=1 + ;; + esac +done + +cd openocd +if [ $impure -eq 1 ]; then + openocd -f zc706.cfg -c 'pld load 0 ../build/gateware/top.bit; load_image ../build/firmware/armv7-none-eabihf/release/szl; resume 0; exit' +else + openocd -f zc706.cfg -c 'pld load 0 ../result/top.bit; load_image ../result/szl.elf; resume 0; exit' +fi diff --git a/shell.nix b/shell.nix index 7c37820..6505c18 100644 --- a/shell.nix +++ b/shell.nix @@ -16,6 +16,7 @@ in pkgs.cacert pkgs.cargo-xbuild + pkgs.openocd pkgs.openssh pkgs.rsync (pkgs.python3.withPackages(ps: (with artiqpkgs; [ migen migen-axi misoc artiq ])))