@@ -5,57 +5,18 @@ session: Morning
55
66# Welcome to Bare Metal Rust
77
8- This is a standalone one-day course about bare-metal Rust, aimed at people who
9- are familiar with the basics of Rust (perhaps from completing the Comprehensive
10- Rust course), and ideally also have some experience with bare-metal programming
11- in some other language such as C.
8+ This is a one-day course about bare-metal Rust: running Rust code without an OS
9+ underneath us.
1210
13- Today we will talk about 'bare-metal' Rust: running Rust code without an OS
14- underneath us. This will be divided into several parts:
11+ The class is divided into several parts:
1512
1613- What is ` no_std ` Rust?
1714- Writing firmware for microcontrollers.
1815- Writing bootloader / kernel code for application processors.
1916- Some useful crates for bare-metal Rust development.
2017
21- For the microcontroller part of the course we will use the
22- [ BBC micro: bit ] ( https://microbit.org/ ) v2 as an example. It's a
23- [ development board] ( https://tech.microbit.org/hardware/ ) based on the Nordic
24- nRF52833 microcontroller with some LEDs and buttons, an I2C-connected
25- accelerometer and compass, and an on-board SWD debugger.
18+ ## Target Audience
2619
27- To get started, install some tools we'll need later. On gLinux or Debian:
28-
29- <!-- mdbook-xgettext: skip -->
30-
31- ``` bash
32- sudo apt install gcc-aarch64-linux-gnu gdb-multiarch libudev-dev picocom pkg-config qemu-system-arm
33- rustup update
34- rustup target add aarch64-unknown-none thumbv7em-none-eabihf
35- rustup component add llvm-tools-preview
36- cargo install cargo-binutils cargo-embed
37- ```
38-
39- And give users in the ` plugdev ` group access to the micro: bit programmer:
40-
41- <!-- mdbook-xgettext: skip -->
42-
43- ``` bash
44- echo ' SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", MODE="0664", GROUP="plugdev"' | \
45- sudo tee /etc/udev/rules.d/50-microbit.rules
46- sudo udevadm control --reload-rules
47- ```
48-
49- On MacOS:
50-
51- <!-- mdbook-xgettext: skip -->
52-
53- ``` bash
54- xcode-select --install
55- brew install gdb picocom qemu
56- brew install --cask gcc-aarch64-embedded
57- rustup update
58- rustup target add aarch64-unknown-none thumbv7em-none-eabihf
59- rustup component add llvm-tools-preview
60- cargo install cargo-binutils cargo-embed
61- ```
20+ This course builds on [ Rust Fundamentals] ( welcome-day-1.md ) and we expect you
21+ are familiar with the basics of Rust. You should ideally also have some
22+ experience with bare-metal programming in some other language such as C.
0 commit comments