Skip to content

Commit

Permalink
clarify renode port
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnie committed Mar 11, 2024
1 parent 30801fd commit 293b52e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ch03-04-debugging-programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@ cargo xtask app-image --gdb-stub mtxchat --feature efuse --feature tls

Then, flash the resulting image to the target device as normal.

## Attaching to the debugger
## Attaching to the debugger (Renode)

If you're using Renode, then you can connect gdb to `localhost:3333` (may also be `3456` on some systems):
If you're using Renode, then you can connect gdb to `localhost:3456`:

```text
riscv-none-elf-gdb -ex 'tar ext :3333'
riscv-none-elf-gdb -ex 'tar ext :3456'
```

On Renode, port `3333` also exists, but it is useful mainly for debugging machine mode, i.e., when the hardware is in the loader or inside the kernel only.

## Attaching to the debugger (Hardware)

On real hardware, you will first need to re-mux the serial port so that gdb is visible on serial. Then you can connect gdb to the target serial port.

For example, if you have a hardware Precursor device connected to a Raspberry Pi 3B+ with a debug HAT running Raspbian "Buster", you would first run this command in `shellchat` on the hardware device itself:
Expand Down

0 comments on commit 293b52e

Please sign in to comment.