STM32 Rust Page
Introduction
This is meant to be a general page for rust when using STM32
Install Rust For Embedded
First we install rust. This adds something to ~/.bashrc so rebooting is the quickest way
sudo apt install curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
For stm32 we need the toolchain
rustup target add thumbv7em-none-eabihf
cargo install cargo-binutils
cargo install cargo-generate
sudo apt install gdb-multiarch openocd qemu-system-arm
Now we install the debugger and the gcc tools. We tried the arm download but it relied on python and shared libraries not on Ubuntu 24.04
apt install gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf gcc-arm-none-eabi
I now use the arm download and put it in the /opt directory, currently arm-gnu-toolchain-14.2, and add it to my path in .bashrc