For more details on embedded development using Rust, the official Rust embedded docs site is the place to go, in particular, you can start with The embedded Rust book.
This is a reminder for myself, if you want to install Rust for a baremetal Cortex-M7 target, this seems to be a tier 3 platform:
https://forge.rust-lang.org/platform-support.html
Higlighting the relevant part:
Target | std | rustc | cargo | notes |
---|---|---|---|---|
... | ||||
msp430-none-elf |
* | 16-bit MSP430 microcontrollers | ||
sparc64-unknown-netbsd |
✓ | ✓ | NetBSD/sparc64 | |
thumbv6m-none-eabi |
* | Bare Cortex-M0, M0+, M1 | ||
thumbv7em-none-eabi |
* | Bare Cortex-M4, M7 | ||
thumbv7em-none-eabihf |
* | Bare Cortex-M4F, M7F, FPU, hardfloat | ||
thumbv7m-none-eabi |
* | Bare Cortex-M3 | ||
... | ||||
x86_64-unknown-openbsd |
✓ | ✓ | 64-bit OpenBSD |
In order to enable the relevant support,
eddy@feodora:~/usr/src/rust-uc$ rustup show
Default host: x86_64-unknown-linux-gnu
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.28.0-nightly (cb20f68d0 2018-05-21)
eddy@feodora:~/usr/src/rust$ rustup show
Default host: x86_64-unknown-linux-gnu
stable-x86_64-unknown-linux-gnu (default)
rustc 1.31.0 (abe02cefd 2018-12-04)
Add the needed target:eddy@feodora:~/usr/src/rust-uc$ rustup default nightly-x86_64-unknown-linux-gnu
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.28.0-nightly (cb20f68d0 2018-05-21)
eddy@feodora:~/usr/src/rust$ rustup target add thumbv7em-none-eabiThen compile with --target.
info: downloading component 'rust-std' for 'thumbv7em-none-eabi'
info: installing component 'rust-std' for 'thumbv7em-none-eabi'
eddy@feodora:~/usr/src/rust$ rustup show
Default host: x86_64-unknown-linux-gnu
installed targets for active toolchain
--------------------------------------
thumbv7em-none-eabi
x86_64-unknown-linux-gnu
active toolchain
----------------
stable-x86_64-unknown-linux-gnu (default)
rustc 1.31.0 (abe02cefd 2018-12-04)
No comments:
Post a Comment