调试

Embed.toml:

[default.general] chip = "nrf52833_xxAA" [debug.gdb] enabled = true

src/bare-metal/microcontrollers/examples/ 目录下某个终端中:

cargo embed --bin board_support debug

在同一目录下的另一个终端中:

在 gLinux 或 Debian 上:

gdb-multiarch target/thumbv7em-none-eabihf/debug/board_support --eval-command="target remote :1337"

在 MacOS 上:

arm-none-eabi-gdb target/thumbv7em-none-eabihf/debug/board_support --eval-command="target remote :1337"

Speaker Notes

在 GDB 中,请尝试运行以下命令:

b src/bin/board_support.rs:29 b src/bin/board_support.rs:30 b src/bin/board_support.rs:32 c c c