DEV Community

Philipp Hansch
Philipp Hansch

Posted on • Originally published at phansch.net on

Exploring Embedded Rust - Part 1

Coming from a web development background, lower level things can sometimes feel veryforeign, especially when your code only ever runs in a languages VM.

I was in the audience for James Munns’ (@jamesmunns) talk about EmbeddedDevelopment at the Berlin Rust meetup last year. At the time of thiswriting that was 9 months ago and I’ve now decided to give embedded developmenta try. I’m going to write this post as I go along.

Since I don’t really have a project that I want to work on, my initial goal isto find out how it is like to work on embedded systems and how approachable thedocumentation is. I’ve worked with a Rasperry Pi briefly and got an LEDblinking, but that was 5 years ago, using Processing.

Getting Started

Searching the internet for ‘rust embedded book’ gave me therust embedded book as a result. Before going through this bookthough, I’ll re-watch James Munns’ talk and make some proper notes of it.

screenshot

With the notes done, it’s time to grab another coffee and start reading thebook. The ‘Assumptions and Prerequisites’ section makes me think that I’m notthe perfect target audience for this book, because apart from the Rasperry Pi,I’ve never debugged any embedded system.

Luckily I found the Discovery book via the bookshelf which islinked in the table on the first page. It seems that this is the book one shouldwork through first. I’ve opened a PR to mention the discovery book a bit moreprominently.

As it seems like the discovery book works with the hardware immediately, I’mgoing to jump back to the QEMU section of the embedded book. Once myhardware arrives I’ll return to the discovery book.

Following the installation instructions worked without problems. It seems likethe majority of the tooling so far consists of QEMU, GDB and only a handful of cargocrates.

Hardware!

screenshot

My device arrived and following the included instructions worked withoutproblems until I tried using the USB interface. It turned out that my old MiniUSB cable didn’t work. I’m not sure why but I think it might be because itdoesn’t support data transfer.

I went to the local electronics store, bought a new one and opened anotherPR to mention the data transfer requirements for the cables.After that I also opened another issue which proposes aGlossary for the embedded book. I’m hoping to get to that by the end of January,unless someone else is faster.

I think this is a good point to wrap up this post as I won’t be able to get backinto it for a few days. In the next post I’m going to try writing my first embeddedRust program following the discovery book.

Top comments (0)