1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-22 14:59:37 +02:00

Add page about debugging with cargo-embed.

This commit is contained in:
Andrew Walbran 2023-03-09 12:32:10 +00:00
parent 0c3664bef3
commit 53223d3581
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,38 @@
# Debugging
Embed.toml:
```toml
[default.general]
chip = "nrf52833_xxAA"
[debug.gdb]
enabled = true
```
In one terminal:
```sh
cargo embed --bin board_support debug
```
In another terminal:
```sh
gdb-multiarch target/thumbv7em-none-eabihf/debug/board_support --eval-command="target remote :1337"
```
<details>
In GDB, try running:
```gdb
b src/bin/board_support.rs:28
b src/bin/board_support.rs:29
b src/bin/board_support.rs:31
c
c
c
```
</details>

View File

@ -1,2 +1,8 @@
[default.general]
chip = "nrf52833_xxAA"
[debug.gdb]
enabled = true
[debug.reset]
halt_afterwards = true