]> git.proxmox.com Git - rustc.git/blame - src/doc/embedded-book/src/intro/install.md
New upstream version 1.35.0+dfsg1
[rustc.git] / src / doc / embedded-book / src / intro / install.md
CommitLineData
9fa01778
XL
1# Installing the tools
2
3This page contains OS-agnostic installation instructions for a few of the tools:
4
5### Rust Toolchain
6
7Install rustup by following the instructions at [https://rustup.rs](https://rustup.rs).
8
9**NOTE** Make sure you have a compiler version equal to or newer than `1.31`. `rustc
10-V` should return a date newer than the one shown below.
11
12``` console
13$ rustc -V
14rustc 1.31.1 (b6c32da9b 2018-12-18)
15```
16
17For bandwidth and disk usage concerns the default installation only supports
18native compilation. To add cross compilation support for the ARM Cortex-M
532ac7d7
XL
19architecture choose one of the following compilation targets. Use the last one
20for the STM32F3DISCOVERY board and follow along with the book.
9fa01778 21
532ac7d7 22Cortex M0 M0+
9fa01778 23``` console
532ac7d7
XL
24$ rustup target add thumbv6m-none-eabi
25```
26
27Cortex M3
28``` console
29$ rustup target add thumbv7m-none-eabi
30```
31
32Cortex M4 M7 without FPU
33``` console
34$ rustup target add thumbv7em-none-eabi
35```
36
37Cortex M4 M7 with FPU <-- STM32F3DISCOVERY
38``` console
39$ rustup target add thumbv7em-none-eabihf
9fa01778
XL
40```
41
42### `cargo-binutils`
43
44``` console
45$ cargo install cargo-binutils
46
47$ rustup component add llvm-tools-preview
48```
49
50### OS-Specific Instructions
51
52Now follow the instructions specific to the OS you are using:
53
54- [Linux](install/linux.md)
55- [Windows](install/windows.md)
56- [macOS](install/macos.md)