Embedded Rust: Microcontroller programming with Rust


[Please clone this repo which contains all the code samples, slides etc: https://github.com/pcein/embedded-rust-workshop ]

The objective of this meetup is to help Rust enthusiasts get started with "bare-metal" embedded systems programming using Rust. You will also gain practical knowledge on how you can jump in and contribute to the embedded Rust ecosystem by creating new drivers and hardware abstraction layers for popular microcontroller platforms!

Here is an outline of the topics we will cover:

- Quick introduction to basics of microcontroller programming using TI/STM32 ARM Cortex-M processors and inexpensive development boards.

- Toolchain setup.

- Update on the current status of the embedded development ecosystem in Rust, with focus on the work by Jorge Aparicio (http://blog.japaric.io/).

- Understanding the new I/O model for microcontroller programming developed by Jorge: we will look at the four different layers of abstraction at which you can program a microcontroller in Rust and the benefits provided by Rust features like ownership and move semantics in providing compile-time safety.

- An introduction to the Embedded Hardware Abstraction Layer ("embedded-hal").

- How to write platform-agnostic drivers (targeting the "embedded-hal") in Rust, using the MCP3008 ADC crate (https://crates.io/crates/adc-mcp3008) as an example.

- How to contribute to the embedded Rust ecosystem.

# What to bring / Tools to be installed

Required: A laptop running a recent version of GNU/Linux.
(Ubuntu 16.04 or later / Debian Jessie or later preferred)

I have experience with GNU/Linux only and may not be able to
troubleshoot installations on other platforms.


Refer: https://japaric.github.io/discovery/03-setup/README.html

Install everything specified here except "itmdump".


Refer: https://japaric.github.io/discovery/03-setup/linux.html

And install all the tools specified here.

(Windows instructions: https://japaric.github.io/discovery/03-setup/windows.html)
(MacOS instructions: https://japaric.github.io/discovery/03-setup/macos.html)

c) Install st-flash (https://github.com/texane/stlink)

Refer: https://github.com/texane/stlink/blob/master/doc/compiling.md (Linux, build from source)

Before building st-flash, please do:

sudo apt-get install build-essential libusb-1.0-0-dev

# Target audience

Ideally, the participants should have some exposure to microcontrollers or computer architecture. Basic C programming skills (especially bit manipulation) will also help.

# Speaker profile

The meetup will be mentored by Pramode C.E (http://pramode.net, http://pramode.in). Pramode is a GNU/Linux and Free Software enthusiast from Kerala who has recently started contributing to the embedded Rust ecosystem by writing embedded-hal drivers: https://crates.io/crates/adc-mcp3008