You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(board_test): rsgdb.env + run_rsgdb_proxy for Cursor target overrides
Wire VS Code remote_ssh task to run_rsgdb_proxy.sh; source optional gitignored
rsgdb.env for RSGDB_TARGET_HOST and friends. Add rsgdb.env.example; document.
Made-with: Cursor
Copy file name to clipboardExpand all lines: examples/board_test_app/README.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,47 @@ Before debugging with **`transport = remote_ssh`** (so `scp` + `ssh` work withou
16
16
2. Confirm **`ssh`** to the target works without a password.
17
17
3. Continue with **Build** and **Debug** below. See the main README **Setting up a Linux target for `remote_ssh` debugging** for the full project-wide checklist.
18
18
19
+
## Configure target IP, deploy, and debug
20
+
21
+
**Remote deploy + debug** is driven by [`rsgdb.remote.toml`](rsgdb.remote.toml): **`rsgdb`****`scp`**s your built ELF to the board, **`ssh`** starts **`gdbserver`** there, then **GDB** (CLI or Cursor) talks to **`127.0.0.1:<listen_port>`** on your PC while the proxy forwards to the board.
22
+
23
+
### 1. Point at your board (IP, user, ports)
24
+
25
+
Edit **`examples/board_test_app/rsgdb.remote.toml`** (paths are relative to the **repo root** when you run **`rsgdb`** from there):
26
+
27
+
| Setting | Meaning |
28
+
|--------|--------|
29
+
|**`[proxy] target_host`**| Board **IP or hostname** (SSH and TCP target when **`[backend.remote_ssh] host`** is unset). |
30
+
|**`[proxy] target_port`**| Port **`gdbserver`** listens on **on the board** (must match **`{port}`** in **`program`**). |
31
+
|**`[proxy] listen_port`**| Port **on your PC** where **GDB** attaches (**`127.0.0.1:this`**). Default **3333** — if you change it, update [`.vscode/launch.json`](../../.vscode/launch.json)**`miDebuggerServerAddress`**. |
32
+
|**`[backend.remote_ssh] user`**| SSH login on the target. |
33
+
|**`upload_local` / `upload_remote`**| Host path → path on the board for **`scp`** before **`gdbserver`**. |
34
+
|**`program`**| Remote command; must include **`{port}`** (same value as **`target_port`**). |
35
+
36
+
**Override IP/port without committing edits to the TOML** (applied after the file is loaded): create **`examples/board_test_app/rsgdb.env`** from [`rsgdb.env.example`](rsgdb.env.example) (that file is **gitignored**). Set **`RSGDB_TARGET_HOST`**, optional **`RSGDB_TARGET_PORT`**, **`RSGDB_PORT`**, or **`RSGDB_SSH_PASSWORD`**. Cursor’s preLaunch task runs [`run_rsgdb_proxy.sh`](run_rsgdb_proxy.sh), which **`source`**s **`rsgdb.env`** if present, then starts **`rsgdb`**.
1.**`make`** / build **`board_test_app`** (the preLaunch task does this).
46
+
2. Run **`rsgdb: board_test_app (build, start proxy, debug)`** — it starts **`rsgdb`** with this TOML, which **deploys** the binary and **starts gdbserver** on the target, then attaches **gdb-multiarch** to **localhost:3333** (or whatever **`listen_port`** / **`RSGDB_PORT`** you use).
47
+
48
+
If **`rsgdb`** is already running in a terminal with the right env/config, use **`rsgdb: board_test_app (proxy already running)`** instead.
In another terminal: **`gdb-multiarch`** → **`target extended-remote 127.0.0.1:3333`** with **`file`** set to the ELF (see **Automated** debug section below).
59
+
19
60
## Build (aarch64 default)
20
61
21
62
The Makefile defaults to **`aarch64-linux-gnu-gcc`**:
0 commit comments