Dies ist der Code für meine Demo im Video "Einführung zu Rust für Embedded Devices". Getestet wurde es lediglich auf einem STM32F4 Board, mit einem LSM9DS1 IMU.
Rust installieren: https://www.rust-lang.org/learn/get-started
Die Flash-Utility installieren:
cargo install cargo-flash
cargo install probe-run
Den Linker installieren:
cargo install flip-link
(Windows: STM USB Treiber installieren: https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-utilities/stsw-link009.html )
Den Code Compilieren und auf das über USB verbundene Board flashen. Im Code-Verzeichniss:
cargo run --release
der verwendete HAL: https://github.com/David-OConnor/stm32-hal https://github.com/David-OConnor/stm32-hal-quickstart