Installing the tools

This page contains OS-agnostic installation instructions for a few of the tools:

Rust Toolchain

Install rustup by following the instructions at https://rustup.rs.

NOTE Make sure you have a compiler version equal to or newer than 1.31. rustc -V should return a date newer than the one shown below.

  1. $ rustc -V
  2. rustc 1.31.1 (b6c32da9b 2018-12-18)

For bandwidth and disk usage concerns the default installation only supportsnative compilation. To add cross compilation support for the ARM Cortex-Marchitectures choose one of the following compilation targets. For the STM32F3DISCOVERYboard used for the examples in this book, use the final thumbv7em-none-eabihf target.

Cortex-M0, M0+, and M1 (ARMv6-M architecture):

  1. $ rustup target add thumbv6m-none-eabi

Cortex-M3 (ARMv7-M architecture):

  1. $ rustup target add thumbv7m-none-eabi

Cortex-M4 and M7 without hardware floating point (ARMv7E-M architecture):

  1. $ rustup target add thumbv7em-none-eabi

Cortex-M4F and M7F with hardware floating point (ARMv7E-M architecture):

  1. $ rustup target add thumbv7em-none-eabihf

cargo-binutils

  1. $ cargo install cargo-binutils
  2. $ rustup component add llvm-tools-preview

OS-Specific Instructions

Now follow the instructions specific to the OS you are using: