README: update build instruction

pull/59/head
Harry Ho 2020-08-07 10:41:08 +08:00
parent 34117c15fd
commit 3807e2e149
1 changed files with 16 additions and 7 deletions

View File

@ -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,32 @@ 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 nixbuild.m-labs.hk server:
```shell
cd ~/zc706
./build.sh $your_user/ssh_id
cd ~/zynq-rs
./build.sh $your_user_or_ssh_id
```
Alternatively, you may copy the zc706 build to the target pi (in your pi $HOME directory, for example) using:
```shell
cd ~/zynq-rs
scp -C target/armv7-none-eabihf/release/experiments your_user_or_ssh_id@pi_hostname:/home/your_user_or_ssh_id/zynq-rs/zc706.elf
```
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
```