Skip to content

Repository files navigation

debugging-embedded-rust firmware workspace

Cargo workspace for the "Debugging Embedded Rust" article series. Target: NUCLEO-F446RE (STM32F446RE, Cortex-M4F), thumbv7em-none-eabihf.

Building

cargo build --workspace          # dev profile, all three projects
cargo build --workspace --release

Project 1 has two variants of the same source (see its Cargo.toml): cargo build -p project1-baseline-counter keeps #[inline(never)] on update_counter; cargo build -p project1-baseline-counter --release --no-default-features removes it.

Flashing / running (probe-rs)

cargo run -p project1-baseline-counter        # flash + run + RTT, via the
                                              # runner in .cargo/config.toml

Flashing / debugging (OpenOCD + GDB)

openocd -f openocd.cfg                        # leave running in a terminal
gdb-multiarch -x .gdbinit target/thumbv7em-none-eabihf/debug/project1-baseline-counter

About

Demonstration project illustrating debugging in no_std Rust projects

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages