Rust examples for BluePill stm32f103x board
Flash release image using cargo-flash:
$ cargo flash --release --chip STM32F103C8 --bin <binary name>
Flash debug image using cargo-embed:
$ cargo embed --bin <binary name> flash
Run flashed image attaching RTT debug console:
$ cargo embed --bin <binary name>
Start tmux debug environment with ST-Link:
$ cargo make debug
Flash release image:
$ cargo make flash_release <binary name>
Flash debug image:
$ cargo make flash_debug <binary name>
Commands:
$ sudo openocd -f tools/openocd.cfg -c 'attach ()'
$ cargo build --bin test
$ cargo run --bin test
Commands:
$ mkfifo /tmp/itm.fifo
$ ~/.cargo/bin/itmdump -f /tmp/itm.fifo -F
$ cargo build --bin test
$ cargo run --bin test
SWO pin PB3 on BluePill has to be connected to appropriate SWO pin on debugger/programmer. Note that ST-Link does not have SWO pin, while Jlink Pro has.
Commands
$ cargo build --bin test
$ cargo embed --bin test flash
$ cargo embed --bin test