/STM32F4DISCOVERY-in-Rust

Develop STM32F4DISCOVERY in Rust

Primary LanguageRustMIT LicenseMIT

STM32 in Rust

This is a project to develop STM32F4DISCOVERY in Rust.

Installation (Arch Linux)

Add the target to the Rust toolchain for Cortex-M4F and M7F with FPU support.

STM32F407VGT6 microcontroller featuring 32-bit ARM®Cortex®-M4 with FPU core

$ rustup target add thumbv7em-none-eabihf

cargo-binutils

$ cargo install cargo-binutils
$ rustup component add llvm-tools-preview

Debugger for ARM Cortex-M programs

$ yay -S arm-none-eabi-gdb

OpenOCD

$ yay -S openocd

Usage

Build the project

$ cargo build

Run OpenOCD to connect to the ST-LINK on the discovery board on a terminal

$ openocd

Run GDB on another terminal.

$ cargo run

Reference

The Embedded Rust Book