This technical post details a comparison between two embedded development approaches: async Rust using Embassy and C using FreeRTOS. Both environments will be tested on an STM32F446 microcontroller, running applications that perform identical actions.
The primary metrics for judging the two implementations include interrupt latency, the overall program size, the amount of RAM consumed, and the perceived ease of programming. The goal is to provide a practical understanding of how RTOSes and async executors function in a real-world embedded context.
The applications developed for this comparison are designed to be portable across different chips and architectures, with the exception of hardware abstraction layer dependencies. They are straightforward implementations, tuned with standard options such as compiler optimizations, RTOS settings, and thread priorities to reflect typical development practices.
Testing will be conducted on an STM32F446ZET6 microcontroller operating at 180MHz. An oscilloscope, specifically a Rigol DS1054Z, will be used for certain measurements, such as interrupt latency.
In Rust, an async function is syntactic sugar for a function that returns a future. A future is an object that can be polled, transforming into a state machine that resumes execution from where it last stopped. Futures are lazy, meaning they only execute when polled, and wakers are used to signal an executor when a future needs to be polled again.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
This article outlines a comparison between Embassy/Rust and FreeRTOS/C for embedded applications on an STM32F446 microcontroller. The comparison will evaluate interrupt latency, program size, RAM usage, and ease of programming for equivalent applications.