Skip to content

Commit cdc4807

Browse files
committed
document probe-rs
1 parent 62a4123 commit cdc4807

File tree

2 files changed

+51
-27
lines changed

2 files changed

+51
-27
lines changed

Diff for: .cargo/def-config.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
# runner = "arm-none-eabi-gdb -q -x openocd.gdb"
55
# runner = "gdb-multiarch -q -x openocd.gdb"
66
# runner = "gdb -q -x openocd.gdb"
7-
runner = "gdb-multiarch -q -x jlink.gdb"
7+
# runner = "gdb-multiarch -q -x jlink.gdb"
88

9-
# Probe-rs is currently problematic: https://github.com/probe-rs/probe-rs/issues/2567
10-
# runner = "probe-rs run --chip VA108xx --chip-description-path ./scripts/VA108xx_Series.yaml"
9+
runner = "probe-rs run --chip VA108xx_RAM --protocol jtag"
1110
# runner = ["probe-rs", "run", "--chip", "$CHIP", "--log-format", "{L} {s}"]
1211

1312
rustflags = [

Diff for: README.md

+49-24
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,56 @@ You can then adapt the files in `.vscode` to your needs.
6060
You can use CLI or VS Code for flashing, running and debugging. In any case, take
6161
care of installing the pre-requisites first.
6262

63-
### Pre-Requisites
63+
### Using CLI with probe-rs
64+
65+
Install [probe-rs](https://probe.rs/docs/getting-started/installation/) first.
66+
67+
You can use `probe-rs` to run the software and display RTT log output. However, debugging does not
68+
work yet.
69+
70+
After installation, you can run the following command
71+
72+
```sh
73+
probe-rs run --chip VA108xx_RAM --protocol jtag target/thumbv6m-none-eabi/debug/examples/blinky
74+
```
75+
76+
to flash and run the blinky program on the RAM. There is also a `VA108xx` chip target
77+
available for persistent flashing.
78+
79+
Runner configuration avilable in the `.cargo/def-config.toml` file to use `probe-rs` for
80+
convenience.
81+
82+
### Using VS Code
83+
84+
Assuming a working debug connection to your VA108xx board, you can debug using VS Code with
85+
the [`Cortex-Debug` plugin](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug).
86+
Please make sure that [`objdump-multiarch` and `nm-multiarch`](https://forums.raspberrypi.com/viewtopic.php?t=333146)
87+
are installed as well.
88+
89+
Some sample configuration files for VS code were provided and can be used by running
90+
`cp -rT vscode .vscode` like specified above. After that, you can use `Run and Debug`
91+
to automatically rebuild and flash your application.
92+
93+
If you would like to use a custom GDB application, you can specify the gdb binary in the following
94+
configuration variables in your `settings.json`:
95+
96+
- `"cortex-debug.gdbPath"`
97+
- `"cortex-debug.gdbPath.linux"`
98+
- `"cortex-debug.gdbPath.windows"`
99+
- `"cortex-debug.gdbPath.osx"`
100+
101+
The provided VS Code configurations also provide an integrated RTT logger, which you can access
102+
via the terminal at `RTT Ch:0 console`. In order for the RTT block address detection to
103+
work properly, `objdump-multiarch` and `nm-multiarch` need to be installed.
104+
105+
### Using CLI with GDB and Segger J-Link Tools
106+
107+
Install the following two tools first:
64108

65109
1. [SEGGER J-Link tools](https://www.segger.com/downloads/jlink/) installed
66110
2. [gdb-multiarch](https://packages.debian.org/sid/gdb-multiarch) or similar
67111
cross-architecture debugger installed. All commands here assume `gdb-multiarch`.
68112

69-
### Using CLI
70-
71113
You can build the blinky example application with the following command
72114

73115
```sh
@@ -101,25 +143,8 @@ runner = "gdb-multiarch -q -x jlink/jlink.gdb"
101143
After that, you can simply use `cargo run --example blinky` to flash the blinky
102144
example.
103145

104-
### Using VS Code
105-
106-
Assuming a working debug connection to your VA108xx board, you can debug using VS Code with
107-
the [`Cortex-Debug` plugin](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug).
108-
Please make sure that [`objdump-multiarch` and `nm-multiarch`](https://forums.raspberrypi.com/viewtopic.php?t=333146)
109-
are installed as well.
146+
### Using the RTT Viewer
110147

111-
Some sample configuration files for VS code were provided and can be used by running
112-
`cp -rT vscode .vscode` like specified above. After that, you can use `Run and Debug`
113-
to automatically rebuild and flash your application.
114-
115-
If you would like to use a custom GDB application, you can specify the gdb binary in the following
116-
configuration variables in your `settings.json`:
117-
118-
- `"cortex-debug.gdbPath"`
119-
- `"cortex-debug.gdbPath.linux"`
120-
- `"cortex-debug.gdbPath.windows"`
121-
- `"cortex-debug.gdbPath.osx"`
122-
123-
The provided VS Code configurations also provide an integrated RTT logger, which you can access
124-
via the terminal at `RTT Ch:0 console`. In order for the RTT block address detection to
125-
work properly, `objdump-multiarch` and `nm-multiarch` need to be installed.
148+
The Segger RTT viewer can be used to display log messages received from the target. The base
149+
address for the RTT block placement is 0x10000000. It is recommended to use a search range of
150+
0x1000 around that base address when using the RTT viewer.

0 commit comments

Comments
 (0)