STM32 Rust Page

From bibbleWiki
Revision as of 22:25, 5 February 2025 by Iwiseman (talk | contribs) (Created page with "=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 <syntaxhighlight lang="bash"> sudo apt install curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh </syntaxhighlight> For stm32 we need the toolchain <syntaxhighlight lang="bash"> rustup target add thumbv7em-none-eabihf cargo install cargo-binutils cargo install c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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