Discovery
Discover the world of microcontrollers through Rust!
This book is an introductory course on microcontroller-based embedded systems that uses Rust as theteaching language rather than the usual C/C++.
Scope
The following topics will be covered (eventually, I hope):
How to write, build, flash and debug an “embedded” (Rust) program.
Functionality (“peripherals”) commonly found in microcontrollers: Digital input and output, PulseWidth Modulation (PWM), Analog to Digital Converters (ADC), common communication protocols likeSerial, I2C and SPI, etc.
Multitasking concepts: cooperative vs preemptive multitasking, interrupts, schedulers, etc.
Control systems concepts: sensors, calibration, digital filters, actuators, open loop control,closed loop control, etc.
Approach
Beginner friendly. No previous experience with microcontrollers or embedded systems is required.
Hands on. Plenty of exercises to put the theory into practice. You will be doing most of thework here.
Tool centered. We’ll make plenty use of tooling to ease development. “Real” debugging, with GDB,and logging will be introduced early on. Using LEDs as a debugging mechanism has no place here.
Non-goals
What’s out of scope for this book:
Teaching Rust. There’s plenty of material on that topic already. We’ll focus on microcontrollersand embedded systems.
Being a comprehensive text about electric circuit theory or electronics. We’ll just cover theminimum required to understand how some devices work.
Covering Rustic, low level details. We won’t be talking about linker scripts, the boot process orhow to glue those two into a minimally working Rust program.
Also I don’t intend to port this material to other development boards; this book will make exclusiveuse of the STM32F3DISCOVERY development board.
Reporting problems
The source of this book is in this repository. If you encounter any typo or problem with the codereport it on the issue tracker.
Other embedded Rust resources
This Discovery book is just one of several embedded Rust resources provided by theEmbedded Working Group. The full selection can be found at The Embedded Rust Bookshelf. Thisincludes the list of Frequently Asked Questions.
Sponsored by
Many thanks to integer 32 for sponsoring me to work on this book! Pleasegive them lots of work (they do Rust consulting!) so they’ll have no choice but to hire moreRustaceans <3.