We have a few options for debug. One is to use a combo of openocd
and gdb
. The other is to use probe-rs
's cargo embed
.
These examples use this project template for reference: https://github.com/rp-rs/rp2040-project-template
Debugging works best with opt-level = 0
for [profile.dev]
in Cargo.toml
, otherwise we're limited in where we can set breakpoints, and there is some other unexpected behavior.
This requires a debug probe. There are many options, but a simple one is to just flash probe fw onto another rp2040. Note that the fw link there is not the latest release.