An embedded rust template for the STM32F4xx Black Pill Board
You need to have a stable version of rust installed. Make sure your version is > 1.6
rustup --versionYou need to install some tools and the correct target:
rustup target add thumbv7em-none-eabihfInstall cargo-generate to generate a project from this template
cargo install cargo-generateInstall cargo flash and embed utility to flash or debug your program
cargo install cargo-flashcargo install cargo-embedGenerate a project with this template:
cargo generate --git https://github.com/EXXETA/stm32f4-blackpill-quickstart.gitGive your project a name and cd into it:
cd my-appBuild it
cargo build --releaseFlash it:
cargo flash --release --chip STM32F401CEUxOr build and flash the example:
cargo flash --example dht22 --chip STM32F401CEUxYou might need to change the chip STM32F401CEUx to your used chip, if you use a different board or chip.
You can debug it by starting a debug session on your chip
cargo embed --releaseAnd in another terminal start gdb
& arm-none-eabi-gdb target/thumbv7em-none-eabihf/debug/hydroponic-stm32f4
& (gdb) target remote :1337
& (gdb) continueThis template includes launch configurations for debugging CortexM programs with Visual Studio Code located in
the .vscode/ directory.
See .vscode/README.md for more information.
If you're not using VS Code, you can safely delete the directory from the generated project.
This template is licensed under either of
-
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
-
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.