https://github.com/nraynaud/pill-rust-test
https://github.com/nraynaud/pill-rust-test
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nraynaud/pill-rust-test
- Owner: nraynaud
- Created: 2019-01-12T20:01:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-10T08:03:32.000Z (about 6 years ago)
- Last Synced: 2025-01-16T20:28:27.782Z (4 months ago)
- Language: Rust
- Size: 244 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blue Pill Balancing Robot
> A personal project to learn embedded rust on a STM32F103.
# Debugging
- run gdb with `remote target | openocd -d1 -f openocd.cfg -c "gdb_port pipe" `
it avoids you having to maintain a separated openocd process
- in RTFM the idle task uses the wfi instruction.
When the MCU is waiting for an interruption, it
won't answer to debug unless you set the `dbg_sleep` at 1
`DBG.cr`:
```rust
#[init]
unsafe fn init() {
let dbg = device.DBG;
dbg.cr.modify(|_, w| w.dbg_sleep().set_bit());
}
```
- if using semihosting, you might want to use my
[openocd version](https://github.com/nraynaud/openocd-semihosting-to-gdb)