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:
parent
0c3664bef3
commit
53223d3581
38
src/bare-metal/microcontrollers/debugging.md
Normal file
38
src/bare-metal/microcontrollers/debugging.md
Normal 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>
|
@ -1,2 +1,8 @@
|
||||
[default.general]
|
||||
chip = "nrf52833_xxAA"
|
||||
|
||||
[debug.gdb]
|
||||
enabled = true
|
||||
|
||||
[debug.reset]
|
||||
halt_afterwards = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user