RTFM v2: simpler, less overhead and more device support

July 29, 2017

Hiya folks! It’s been a while. Today I’m pleased to present the next version of the Real Time For the Masses framework: cortex-m-rtfm v0.2.0 or just v2, which is how I like to call it. Here’s the executive summary of the changes: v2 is simpler. v1 used a bunch of tokens – ceiling tokens, priority tokens, preemption threshold tokens and task tokens – for memory safety; this made the API rather boilerplatery. ... Read more

A CPU usage monitor for the RTFM framework

June 4, 2017

We have used the RTFM framework in the previous posts but put most of the application logic in tasks, and always sent the processor to sleep in the idle function. In this post we’ll put the idle function to better use and build a CPU usage monitor there. Idle The main logic of the CPU usage monitor will be in the idle function. Let’s see how it works: // RESOURCES peripherals! ... Read more

The ITM and the quest for faster logging

May 31, 2017

In this post we’ll explore the different alternatives one has to log data from a microcontroller to some host machine. Be it for printf style debugging or for logging sensor data. The Blue Pill This time I’ll use a different development board: the Blue Pill. On the center the Blue Pill development board. On the left side a UART to USB adapter based on the CH340G. On the right side an SWD programmer: a Chinese clone of the ST-LINK. ... Read more

Overhead analysis of the RTFM framework

May 23, 2017

In the last post I introduced the RTFM framework, and made several claims about it being highly efficient both in memory usage and runtime overhead. In this post I’ll analyze all the RTFM concurrency primitives to back up those claims. To do that I’ll first introduce a non-invasive timing method that’s accurate to a single clock cycle, which is the time the processor spends to execute one of the simplest instructions. ... Read more

Fearless concurrency in your microcontroller

May 9, 2017

I want to start by thanking all the people that has sent improvements and comments to all the crates and tools I presented in the last blog post. The Rust community rocks! Last time I showed you how to easily develop Rust programs for pretty much any ARM Cortex-M microcontroller. In this post I’ll show you one way of doing memory safe concurrency. It’s important to note that the Rust language doesn’t impose a single concurrency model. ... Read more

Rust your ARM microcontroller!

April 28, 2017

Want to program your microcontroller in Rust but your microcontroller vendor doesn’t provide a Rust HAL / SDK? No wonder. AFAIK, no vendor is betting for Rust … yet. How about binding to a C HAL? No? Don’t feel like wrestling with bindgen and the HAL build system and then having a bunch of unsafe FFI calls in your application? OK, how’s this alternative: A method to easily build 100% Rust applications that can use all the device hardware through a memory safe API? ... Read more

Hello, world!

April 24, 2017

Hey there! Welcome to my blog, where I’ll be writing about Rust and embedded systems-y stuff – that’s it, mainly about programming ARM Cortex-M microcontrollers as that’s what Rust best supports today 1. But, I’m interested in anything that has a #![no_std] attribute in it 2 so I may cover some other stuff as well. That being said, this first post is neither about Rust or embedded stuff as it’s mainly for testing my blogging setup; so, why not write about that instead? ... Read more

Creative Commons License
Jorge Aparicio