Uncategorized

Making Sense of Real-Time Operating Systems in 2024

The best part about real-time OS (RTOS) availability in 2024 is that we developers are positively spoiled for choice, but as a corollary this also makes it a complete pain to determine what the optimal choice for a project is. Beyond simply opting for a safe choice like FreeRTOS for an MCU project and figuring out any implications later during the development process, it can pay off massively to invest some time up-front matching the project requirements with the features offered by these various RTOSes. A few years ago I wrote a primer on the various levels of ‘real-time’ and whether you may even just want to forego an RTOS at all and use a simple Big Loop™ & interrupt-based design.
With such design parameters in mind, we can then look more clearly at the available RTOS options available today, which is the focus of this article. Obviously it won’t be an exhaustive comparison, and especially projects like FreeRTOS have seen themselves customized to various degrees by manufacturers like ST Microelectronics and Espressif, among others. This also brings to the forefront less pleasant considerations, such as expected support levels, as illustrated by e.g. Microsoft’s Azure RTOS (formerly ThreadX) recently getting moved to the Eclipse Foundation as the Apache ThreadX open source project. On one hand this could make it a solid open-source licensed RTOS, or it could have been open sourced because Microsoft has moved on to something else and cleared out its cupboard.
Thus without further ado, let’s have a look at RTOSes in 2024 and which ones are worth considering, in my opinion.

Answering Some Questions
A crucial distinction when looking at operating systems for embedded systems is the kind of platform it is. If it’s something along the lines of an x86, Cortex-A ARM or similar, you’re likely looking at a desktop-like system, where a real-time OS such as VxWorks, QNX, a BSD or Linux (with or without real-time patches) is probably the best choice, if only due to hardware support concerns. For situations where hard real-time considerations are the most essential, an FPGA/CPLD-based solution might instead be worth it, but this is of course less flexible than an MCU-based solution.
If at this point an MCU-based solution seems the most sensible one, the next logical question is ‘which one RTOS?’. The answer to this is hidden somewhere in long lists of RTOSes, such as the one found over at Wikipedia, or the one over at the OSRTOS website. Assuming for a moment that we are looking only at open source RTOSes here that are seeing active development, we can narrow it down somewhat to the following list:

Of note is that the popular Mbed project was abandoned in July of 2024, rendering the future of this RTOS highly uncertain. Even with that one taken out of the picture, we are still left with an impressive list. Is NuttX better than ThreadX? What about Zephyr versus RIOT or ChibiOS/RT? Merely reading the bullet points for the features gets one only so far. Perhaps the most important questions here pertain to issues such as:

Build system requirements
Demands on a specific compiler (version)
Programming languages one can use with the OS
Whether direct hardware access to peripherals is allowed or require going through a HAL of some description.
Support availability when something inevitably doesn’t work as expected.
Accessibility of the source code when reading through it (readability, documentation, etc.)

Baseline Expectations
The baseline for the build environment demands and supported features is set here at FreeRTOS. It runs on a wide range of (MCU) platforms, provides a number of schedulers, SMP support, happily compiles with just about any compiler toolchain and is C-based so can be used with any programming language that can cooperate with C APIs. Direct hardware access is the standard way for peripherals and the OS generally gets out of your way beyond scheduling and multi-tasking matters. This ‘stay out of the way’ approach persists with developer tools and configuration, which works as easily in Vim as in any other editor.
ThreadX
As of writing the documentation is a stack of Markdown files on GitHub which are clearly not converted yet from their Azure OS era, and ‘getting started’ refers to connecting to the Microsoft Azure cloud. Building the library is apparently done using CMake, Ninja and the standard ARM GCC toolchain for ARM targets, but where’s a sample project and what about other MCU platforms?
After confusing myself clicking through the ‘documentation’ for a while, I’m sure that I would not pick this RTOS as I am spending far too much time even figuring out the basics.
Contiki-NG
Documentation exists and doesn’t look too bad, but you’re pushed right into using a Docker image for development. Fortunately native installation instructions are provided for Linux and MacOS, but not Windows. It’s clear that this RTOS is focused on Internet of Things projects, while the ability to easily run the code as a native (Linux) process is nifty.
Feels like this RTOS could be nice for network-related projects.
OpenERIKA
Confusing website and the impression is that it’s ‘free’, but do not expect any support unless you’re willing to pay for it. Hard pass.
MicroC/OS
I’m sure that Silicon Labs had good intentions with their Micrium OS site, but it’s too hard to find anything on it, never mind how to get started with the thing, plus it seems locked to Silabs devices. Ditto for the Weston-Embedded website. Hard pass.
RIOT
Seems to use basic tools and the standard platform toolchains per the ‘getting started‘ documentation. Build system is GNU Make-based, which is very flexible and should integrate with other build systems with little issue. Quite a lot of documentation to dig through, and might be worth scratching an itch with that FreeRTOS doesn’t cover?
NuttX, Zephyr, ChibiOS/RT
RTOSes which have lots of bullet points are kinda fancy, but demanding the use of KConfig with NuttX, the insistence on setting up a special Python-based development with Zephyr and the seemingly hard requirement to use the special IDE with ChibiOS/RT all makes for problematic choices that will make developing with these either impossible — KConfig on Windows — or integrating with other build systems impossible to tedious.
While I’m not a Python hater, my experiences with Python-based build environments and tools are very negative, and I’d rather avoid such unnecessary dependencies in a development workflow. If you’re a Python fan, you might want to look more seriously at Zephyr.
With that said, the remaining RTOSes in the list are fairly small and can probably be skipped safely.
FreeRTOS
Back in my original 2021 article I covered getting started with FreeRTOS, which at the time was focused mostly on STM32 and similar ARM-based MCUs. Since then I have extensively expanded my use of FreeRTOS in the form of Espressif ESP32 development, both on the base ESP32 MCU and the ESP32-S3. This provided a range of interesting perspectives, also since I was porting significant amounts of cross-platform C and C++ code to these MCUs.
An important aspect of FreeRTOS is that it is commonly included in MCU SDKs, as is the case with Espressif’s ESP-IDF. It supports three different versions of FreeRTOS: the single-core ‘vanilla’ FreeRTOS, the Espressif (SMP) version and Amazon’s SMP FreeRTOS. Espressif’s version is optimized for the dual-core design of the ESP32 and ESP32-S3 and the default choice. What this demonstrates clearly is that the strength of FreeRTOS lies in its flexibility. You can slot in any custom scheduler, heap allocation algorithm, and pile on additions that are optimized for the target platform.
ESP-IDF provides partial POSIX compatibility, which uses FreeRTOS primitives internally. In order to port projects based on the cross-platform PoCo libraries, I added FreeRTOS support to these in the compatible NPoCo project. With this approach I can use virtually all of the features provided by the PoCo libraries also with (ESP-IDF) FreeRTOS, while allowing for the exact same code to compile on desktop platforms. The only platform-specific elements (e.g. start-up and peripheral use) are handled by compile-time preprocessor inclusions.
Drawing Conclusions
Although there are many ways to go about developing a project and advocating a particular approach is the best way to end up forever shunned by friends & colleagues, looking at a different approach can be enlightening. Over my own career I have gravitated strongly towards simplicity and reducing potential pain points. A big part of this is finding the optimal ways to do as little work as possible, which is where my own approach to MCU-based RTOSes comes from. I really don’t want to write more code than absolutely necessary, also because new code has new bugs.
As software is incredibly flexible, the real value in an (RT)OS lies in the scheduler, heap allocator and similar elements which provide the primitives on which other features can be built. While many RTOSes seem to go out of their way to (incompatibly) replicate the scope of the entire Linux kernel space & userspace in miniature, this to me at least seems restrictive. What I personally appreciate in FreeRTOS is that you can have as much or as little FreeRTOS in your code as you want, making it extremely hackable.
For others their priorities may be completely different, in which case any of the other RTOSes may work better, which is also perfectly fine. As long as the project is completed on time, within budget and no keyboards were thrown through the room, there are no wrong choices. […]

Uncategorized

LIV Golf ignores Jon Rahm, Cam Smith’s plea as it relates to Open Championship prep for 2025

LIV Golf has unveiled more events as part of its 2025 schedule, which features familiar spots and new locales, such as South Korea and Indianapolis, Indiana.
Yet, the Saudi-backed circuit ignored a request from Jon Rahm and Cameron Smith. Both major champions wanted LIV to stage an event at a links course prior to The Open Championship, hoping that it would better prepare them for golf’s oldest major.
Instead, the league will return to Southern Spain from Jul. 11-13, the week before Royal Portrush hosts The Open in Northern Ireland for a second time. Valderrama Golf Club, the site of the 1997 Ryder Cup that often draws comparisons to Augusta National, will host a LIV tournament for the third straight year. It’s the second consecutive season in which this course will stage this event immediatley before The Open.
Valderrama is no doubt a phenomenal golf course, one of the highlights of the LIV Golf season. But the problem lies with its place on the calendar. The golf course—along with the climate—differs significantly from what players will face at The Open the following week. It’s no wonder why so many PGA Tour stars tee it up at the Genesis Scottish Open the week before The Open each year. They want to get accustomed to the weather and links golf, a completely different style of play.
“It was really two polar opposites of golf,” Smith said to news.com.au on Oct. 30 about this past year, which featured LIV Golf’s Valderrama event and The Open in back-to-back weeks.
“It was really hot [at Valderrama], and the ball was going a long way up in altitude, and then getting on to links [at Royal Troon], where it’s quite cold and windy, it’s probably not the best prep.”
Three days after this past year’s Open at Royal Troon, ahead of LIV Golf’s event in the United Kingdom, Rahm told Golf Digest’s Evin Priest that he would like to see a LIV Golf event held on a links-style course ahead of The Open—similar to what the PGA Tour does at The Renaissance Club with the Genesis Scottish Open.
“I’m pushing for it,” Rahm said to Golf Digest on Jul. 24.
“There’s so much that goes into adjusting to links golf, getting used to the greens and the ball reacting on the ground. I didn’t think about it until after [Royal Troon], but it’s undeniable how much it helps to play a links golf course the week before the Open.”
Many LIV golf stars—other than Rahm—struggled to get acclimated to the conditions this past July. Smith, who won at St. Andrews in 2022, opened with a 9-over 80 and missed the cut at Royal Troon. Bryson DeChambeau, the reigning U.S. Open champion, also failed to make the weekend.
Overall, five of the 16 LIV players in the field missed the cut, while only three finished among the top 20. Rahm tied for seventh, finishing eight strokes back of champion Xander Schauffele.
Maybe their results would have been better if LIV staged an event in the British Isles before The Open Championship. Rahm and Smith certainly feel that way.
Nevertheless, LIV Golf has announced 10 events for its 2025 schedule. Four more have not yet been announced. The partial 2025 schedule is listed below, which also includes the four majors:
Feb. 6-8 — LIV Golf Riyadh — Riyadh Golf Club, Saudi Arabia
Feb. 14-16 — LIV Golf Adelaide — The Grange Golf Club, Australia
Mar. 7-9 — LIV Golf Hong Kong — Hong Kong Golf Club at Fanling, Hong Kong
Mar. 14-16 — LIV Golf Singapore — Sentosa Golf Club, Singapore
Apr. 10-13 — The Masters — Augusta National, Georgia
May 2-4 — LIV Golf Korea — Jack Nicklaus Golf Course, South Korea
May 15-18 — PGA Championship — Quail Hollow Club, North Carolina
Jun. 12-15 — U.S. Open — Oakmont Country Club, Pennsylvania
Jun. 27-29 — LIV Golf Dallas — Maridoe Golf Club, United States
Ju. 11-13 — LIV Golf Andalucía — Real Club Valderrama, Spain
Jul. 17-20 — The 153rd Open Championship — Royal Portrush, Northern Ireland
Jul. 25-27 — LIV Golf United Kingdom — JCB Golf & Country Club, United Kingdom
Aug. 8-10 — LIV Golf Chicago — Bolingbrook Golf Club, United States
Aug. 15-17 — LIV Golf Indianapolis — The Club at Chatham Hills, United States
Jack Milko is a golf staff writer for SB Nation’s Playing Through. Be sure to check out @_PlayingThrough for more golf coverage. You can follow him on Twitter @jack_milko as well. […]

Uncategorized

Penei Sewell’s dominance is fueling the Detroit Lions’ Super Bowl hype

When teams start losing in games, they tend to lean on their best players to get them out of a rut. These guys are the ones you feed targets to, the ones you get the ball in their hands and you just let them cook.
The Lions did that, too. But their best player is a right tackle who craters everything in his way.
I’m sure you’ve heard by now—the Lions won a football game where Jared Goff threw five interceptions. The absolute worst case scenario happened for Detroit and they ended up winning anyway. They might actually be the team of destiny.
The way they got back into the game was through some incredible defense (shoutout DC Aaron Glenn, DT Alim McNeill and CB Carlton Davis III), the offense found their mojo by leaning on RT Penei Sewell and getting him in space. Sewell is a monster in the open field, creating holes to get the Lions’ skill position players out in space and create explosives in that area.
Detroit hit big on a couple plays where Sewell’s movement was emphasized. The first one of the second half was this toss play to get Sewell and RB Jahmyr Gibbs out in space. You get a good block from WR Amon-Ra St. Brown on the EDGE, and Sewell gets out into space. Once he gets into space, you might as well get off Highway 58. Sewell’s block on CB Kamari Lassiter ends up making two Texans take each other out, and Gibbs is on his way to another explosive play.

The next one was a cheeky little swing screen to Jahmyr Gibbs on a nice playcall against Cover 1. The receivers run their defenders the other way, and Highway 58 gets rolling and Gibbs goes right behind him. Look at the speed Sewell displays on this run and then the casual power to get LB Azeez Al-Shaiir leaning, then following through on the cutback to get Gibbs some more extra yards. Prioritizing his movement in space is going to always be the ace in the hole for the Lions on offense.

Running behind Highway 58 is always going to be a good plan for Detroit, but I also liked this crunch run they hit big on a Houston defense that is predicated on verticality and getting upfield in a hurry. Crunch is a run that’s designed as a trap run and a wham run combined, using the tight end to block the defensive tackle and the guard wrapping and blocking the other defensive tackle. You can see the split between Sewell and the right guard from the end zone angle is a little wider, because they’re trying to influence the defensive tackle to come upfield only for him to get trapped. Then with how wide the Texans’ defensive end is playing, this gap is bigger than the Suez Canal.

The Lions legitimately might be the best team in the sport. The fact that they can overcome the Jared Goff disaster game is such a testament to the team the Lions have built. At 8-1 with a game against the Jaguars coming up, there’s a chance this team absolutely steamrolls through the NFC. If they do, I can promise you it’ll be while riding on Highway 58. […]

In the Spotlight

Making Sense of Real-Time Operating Systems in 2024

by Maya Posch in Uncategorized 0

The best part about real-time OS (RTOS) availability in 2024 is that we developers are positively spoiled for choice, but as a corollary this also makes it a complete pain to determine what the optimal [...]