remove outdated/unmaintained files

This commit is contained in:
Sebastien Bourdeauducq 2020-09-09 14:57:03 +08:00
parent 4fef8a7192
commit 7edd192c3b
4 changed files with 3 additions and 127 deletions

View File

@ -8,37 +8,7 @@ Currently the ELF output is placed at `target/armv7-none-eabihf/release/experime
# Debug
## Using the Xilinx toolchain
Tested with the ZC706 board.
Run the Xilinx Microprocessor Debugger:
```shell
/opt/Xilinx/14.7/ISE_DS/EDK/bin/lin64/xmd
```
Connect to target (given it is connected and you have permissions):
```tcl
connect arm hw
```
Leave xmd running.
Start the Xilinx version of the GNU debugger with your latest build:
```shell
/opt/Xilinx/14.7/ISE_DS/EDK/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gdb zc706
```
Connect the debugger to xmd over TCP on localhost:
```gdb
target remote :1234
```
Proceed using gdb with `load`, `c`
## Using OpenOCD
### Running on the ZC706
## Running on the ZC706
```shell
nix-shell --command "cargo xbuild --release -p experiments"
@ -46,7 +16,7 @@ cd openocd
openocd -f zc706.cfg
```
### Running on the Cora Z7-10
## Running on the Cora Z7-10
```shell
nix-shell --command "cd experiments && cargo xbuild --release --no-default-features --features=target_cora_z7_10"
@ -54,49 +24,8 @@ cd openocd
openocd -f cora-z7-10.cfg
```
### Loading a bitstream into volatile memory
## Loading a bitstream into volatile memory
```shell
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):
```shell
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 zynq-rs
# For ZC706, run:
./tmux.sh 0
# For Cora Z7, run:
./tmux.sh
```
Time to run your code with:
```shell
zynq-connect
zynq-restart
c
```
or, for a more succinct experience, (identical to above)
```shell
dc
dr
c
```
After every build on your dev machine, simply run:
```shell
dr
c
```
Sometimes you might need to type `load` after `dr`.

View File

@ -1,6 +0,0 @@
target remote :1234
# print demangled symbols by default
set print asm-demangle on
load

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -e -m
ELF=$1
IMAGE=$ELF.bin
arm-none-eabihf-objcopy -O binary $ELF $IMAGE
qemu-system-arm -M xilinx-zynq-a9 -s -kernel $IMAGE -chardev file,id=uart0,path=/tmp/qemu.serial &
sleep 1
gdb -x qemu.gdb $ELF
kill -KILL %1

36
tmux.sh
View File

@ -1,36 +0,0 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p gdb openocd cgdb tmux
SESSION=$USER
if [ $1 -eq 0 ]
then
tmux -2 new-session -d -s $SESSION
tmux new-window -t $SESSION:1 -n 'ZC706'
tmux split-window -h
tmux select-pane -t 0
tmux send-keys "stty 115200 < /dev/ttyUSB1 && cat /dev/ttyUSB1" C-m
tmux select-pane -t 1
tmux send-keys "sleep 10 && cgdb zc706.elf -x openocd/gdb-zynq-commands" C-m
tmux split-window -v
tmux resize-pane -D 20
tmux send-keys "cd openocd && openocd -f zc706.cfg -c reset init" C-m
else
tmux -2 new-session -d -s $SESSION
tmux new-window -t $SESSION:1 -n 'CORA Z7'
tmux split-window -h
tmux select-pane -t 0
tmux send-keys "stty 115200 < /dev/ttyUSB1 && cat /dev/ttyUSB1" C-m
tmux select-pane -t 1
tmux send-keys "sleep 10 && cgdb target/armv7-none-eabihf/release/zc706-experiments -x openocd/gdb-zynq-commands" C-m
tmux split-window -v
tmux resize-pane -D 20
tmux send-keys "cd openocd && openocd -f cora-z7-10.cfg -c reset init" C-m
fi
# Set default window
tmux select-window -t $SESSION:1
# Set focus on gdb
tmux select-pane -t $SESSION:.-
# Attach to session
tmux -2 attach-session -t $SESSION