← All updates

Embedded: switching RTOS & UART

Currently, the Embedded sub-team’s main focus is on a major transition within the embedded software stack: moving their real-time operating system (RTOS) from MbedOS to FreeRTOS.

A real-time operating system is a software layer between the hardware and application code. It manages tasks, scheduling and hardware interactions so that multiple operations run predictably. Embedded systems often have to respond to events within strict timing limits, so the choice of RTOS matters.

The shift from MbedOS to FreeRTOS is driven by several factors. First, MbedOS is being deprecated, making long-term support seem uncertain. FreeRTOS, on the other hand, is lightweight, widely adopted in industry, and provides developers with more direct control over system behavior. This switch means we have greater freedom to tailor the system to our needs while also gaining experience with tools and patterns that are standard in professional embedded development.

While the RTOS transition is the overarching project, our current day-to-day work involves building high-level drivers in C++ on top of FreeRTOS. These drivers support functions such as UART communication, logging, analog input handling, and other interfaces the hardware relies on. FreeRTOS does not provide these abstractions, so the application layer depends on our drivers.

High-level drivers are necessary because the microcontroller manufacturer (STM in our case) only supplies low-level C drivers. These low-level drivers interact directly with the hardware but are often cumbersome to use in larger applications. We wrap this low-level functionality in C++ interfaces that are easier and safer to use, which makes the code easier to read and maintain and speeds up development for anyone working with the hardware through FreeRTOS.