← Back to projects

Blinking LED on a Micro:bit 2 in Rust

Use of Rust in Embedded Systems

RustEmbedded

2025-02-15

Overview

This is a small project in which I wanted to learn the basics of Rust and its implementation for embedded systems. I was really interested in the no_std and no_main functionality of this programming language and wanted to make something practical and deploying it on a Micro:bit 2 board.

As a part of a univeristy course, I have also prepared a presentation on differences between Rust and C/C++, emphasizing what the pros and cons are.

What I Learned

  • How to setup the Rust environment (Cargo, memory.x, Embed.toml etc)
  • Rust variables in mutability (which differs from other languages!)
  • The possibility of using Rust in embedded solutions (with help of e.g. Embassy framework)

Technical Challenges

The biggest challenge was to understand the mutability (I'm serious). For one working in other environments, Rust may appear nonobvious. But it's worth learning it, at least the basics.

Future Improvements

  • None