From c69cd9951ed904ff5a1d31b1db5b1758f5f4d445 Mon Sep 17 00:00:00 2001 From: harry Date: Tue, 11 Aug 2020 11:24:21 +0800 Subject: [PATCH] Update README and build.sh (#59) update build.sh to use rpi-4 directly; fix README README: update build instruction build.sh: fix missing package argument Co-authored-by: Harry Ho --- README.md | 17 ++++++++++------- build.sh | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ff7011a..abfbe9d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Build ```shell -nix-shell --command "cargo xbuild --release" +nix-shell --command "cargo xbuild --release -p experiments" ``` Currently the ELF output is placed at `target/armv7-none-eabihf/release/experiments` @@ -41,7 +41,7 @@ Proceed using gdb with `load`, `c` ### Running on the ZC706 ```shell -nix-shell --command "cargo xbuild --release" +nix-shell --command "cargo xbuild --release -p experiments" cd openocd openocd -f zc706.cfg ``` @@ -57,23 +57,26 @@ openocd -f cora-z7-10.cfg ### Loading a bitstream into volatile memory ```shell - openocd -f zc706.cfg -c "pld load 0 blinker_migen.bit; exit" +openocd -f zc706.cfg -c "pld load 0 blinker_migen.bit; exit" ``` ### Development Process Clone this repo onto your development/build machine and the raspberry pi that controls the Xilinx 7000 board -On the dev machine, the below script builds zc706 and secure copies it to the target pi (in your pi $HOME directory) +On the dev machine, the below script builds zc706 and secure copies it to the target pi (in your pi $HOME directory): ```shell -cd ~/zc706 -./build.sh $your_user/ssh_id +cd ~/zynq-rs +./build.sh $your_user_or_ssh_id ``` On the pi, we need an information rich environment that includes a relatively reliable `gdb` experience (that includes `ctrl-p` and `ctrl-n` command history that persists across `cgdb` executions), run: ```shell ssh pi4 -cd zc706 +cd zynq-rs +# For ZC706, run: +./tmux.sh 0 +# For Cora Z7, run: ./tmux.sh ``` diff --git a/build.sh b/build.sh index a6c72cf..be726a1 100755 --- a/build.sh +++ b/build.sh @@ -1 +1 @@ -nix-shell --command "cargo xbuild --release -p experiments" && scp -P 2204 -C target/armv7-none-eabihf/release/zc706-experiments $1@nixbld.m-labs.hk:/home/$1/zc706/zc706.elf +nix-shell --command "cargo xbuild --release -p experiments" && scp -C target/armv7-none-eabihf/release/experiments $1@rpi-4.m-labs.hk:/home/$1/zc706/zc706.elf