Tier 3 Means Getting Your Hands Dirty
summary
A simple AVR blinky plus button example intermittently fails; swapping an unwrap for map_err(|_| ()), or toggling inlining, makes the bug appear or disappear. Reproduction uses cross-compile builds, rustc flags like emit llvm-ir, simavr traces and emitted assembler to inspect an unexpected alloca and a mismatched prologue/epilogue where the frame pointer restore bug runs after pops. The root is in LLVM, a patch is written, landed in LLVM and then cherry-picked into Rust, and the fix makes the example work.
AI-written summary · about
chapters (6)
- 0:00Start
- 22:33DEBUGGING A MICROCONTROLLER
- 23:02NAIVE DEBUGGING
- 23:52SIMULATING A MICROCONTROLLER
- 26:56BLINKY W/ BUTTON
- 53:46NEXT STEPS
related talks
32mrustc in userland
19mCounterexamples in Safe Rust
31mGetting Something for Nothing
04mLightning Talk - Embedded Rust
14mAn Empirical Study of Bugs in the rustc Compiler
21mMind the Boundary: Detecting Undefined Behavior Across Rust’s FFI
33mBeyond println!: Mastering Rust Debugging
22mThe Rust Borrow Checker - A Deep Dive
