INTRO
1.
Intro
2.
Prerequisites for the Book
UNDERSTANDING DRIVERS (theory)
3.
Intro to Drivers
4.
Role 1: Controlling the device below
5.
Role 2: Providing an interface
6.
Types of Drivers
BARE METAL PROGRAMMING
7.
No std preface
7.1.
Machine Code
7.2.
Dependencies
7.3.
The Standard Library
7.4.
Bare Metal
7.5.
Disabling the Standard Library
7.6.
The Core library
7.6.1.
Panic Symbols
7.6.2.
Memory Symbols
7.7.
Practicals - part 1
7.8.
Practicals - part 2
8.
Cross-Compilation
8.1.
LLVM
8.2.
Cranelift
9.
Linkers and Linking
10.
Practicals - part 3
11.
Binary Inspection
THEORY ON THE UART
12.
Intro
13.
general overview
14.
uart registers- part 1
15.
uart registers- part 2
ABSTRACTIONS OVER HARDWARE
16.
Abstractions
17.
Abstracting a Peripheral
17.1.
System Timer - Part 1
17.2.
System Timer - Step 1 & 2
18.
Registers and MMIO programming
19.
re-definition using strict provenance
20.
The datasheet
21.
Abstraction
21.1.
MAC, PAC, HAL
21.2.
svd2rust
21.3.
SVD
21.4.
IP-XACT
21.5.
UVM
21.6.
SystemRDL
21.7.
vcell
21.8.
representations
22.
random
THE UART IMPLEMENTATION (on Qemu and single-threaded)
23.
Intro
23.1.
Setting Things Up
23.2.
Setting up the compiler
23.3.
No-std recap
23.4.
Setting up the Riscv Virtual environment
23.5.
Setting up the linker
23.6.
Automating build & run
24.
Loaders and Bootloaders
24.1.
The Bootloader
24.2.
tutorial over a naive UART implementation on a Esp32 device
Testing
25.
no-std testing
Probing
26.
Probing
26.1.
Probing Theory
26.2.
Probing Pracs
26.3.
udev
26.4.
Flashing
26.5.
Monitoring and Logging
26.5.1.
draft_1
26.6.
Debugging
26.7.
No-std testing
THE UART IMPLEMENTATION (less naive, with concurrency in mind)
27.
Concurrency
27.1.
critical section crate
27.2.
critical-sections in single-threaded cores
27.3.
critical-secions above multi-cores
27.4.
real-life-examples
28.
tutorial over a naive UART implementation on a Qemu device
29.
tutorial over a naive UART implementation on a Esp32 device
OTHER STORIES
30.
Performance testing
31.
Driver Security
31.1.
Common Security Issues in Driver Development
31.2.
Rust's Safety Features for Driver Security
31.3.
Best Practices for Secure Driver Development
32.
Case Studies and Examples
32.1.
Real-world Driver Development Examples
32.2.
Analyzing an Existing Rust Driver
33.
Iterative Implementation
34.
core::io
34.1.
display and debuging structure
35.
Custom Targets
APPENDIX
36.
Notable Crates
37.
Notable Learning Resources
38.
Notable core-crates
39.
why use Rust?
40.
The Rust Toolchain
41.
Further Explanations
41.1.
Firmware versus Drivers
41.2.
different_std_libs
41.3.
a-runtime
41.4.
the-C-runtime
41.5.
the-Rust-runtime
41.6.
Riscv Runtime
41.7.
execution-environment
41.8.
api-definition
41.9.
abi-definition
41.10.
isa-definition
41.11.
factors affecting object file
41.12.
How to build runtimes
41.13.
rustup-target-add
41.14.
Direct Memory Access
41.15.
communication protocols
42.
tips on pointer abstraction
43.
svd2rust further explanations
DRAFTS
44.
bench-marking
45.
more on no-std
45.1.
core::mem
45.2.
core::iter
46.
macros
47.
untouched
48.
Codegen
UNBECOMING
49.
HDLs
50.
Interfaces
51.
community_links
Light
Rust
Coal
Navy
Ayu
driver development in Rust
undone:
fuzzing
unit testing
integration testing
formal verification
performance testing
concurrency testing
remember miri, loon, criterion