rustup default nightly
rustup component add rust-src
cargo install --force rustfmt-nightly
rustup target add thumbv7em-none-eabihf
cargo install svd2rust
cargo build
Install stlink tools.
./scripts/deploy
# or manually
arm-none-eabi-objcopy \
-O ihex \
target/thumbv7em-none-eabihf/debug/oxcc \
target/thumbv7em-none-eabihf/debug/oxcc.hex
st-flash --format ihex write target/thumbv7em-none-eabihf/debug/oxcc.hex
Install OpenOCD:
sudo apt-get install openocd
./scripts/run-openocd
# or manually
# openocd -f board/stm32f7discovery.cfg
cargo run
# or manually
# arm-none-eabi-gdb target/thumbv7em-none-eabihf/debug/oxcc