Celebrating 25 years of μC/OS!

In some ways, it’s hard for me to believe that the µC/OS kernel is 25 years old; perhaps mostly because I don’t want to believe it! The kernel has an interesting history, largely because it didn’t start as a commercial project, and yet 25 years on, I find myself still hard at work on µC/OS products. Now seems like a good time for a look back at the software’s origins, as many of the challenges that existed then are still experienced by developers today. The difference is that now the proven, certifiable real-time operating system (RTOS) µC/OS-II® and µC/OS-III® kernels are commercially available.

The μC/OS story started in 1989, when I joined Dynalco Controls in Fort Lauderdale, Florida, and began working on the design of a new microprocessor-based ignition control system for a large industrial reciprocating engine. I was convinced that an RTOS kernel would benefit this project. Initially I wanted to use a kernel I had experience with, but budget requirements drove the selection of a less costly alternative. It quickly became apparent that I was paying for the seemingly cheaper RTOS with my time. I spent the next two months in contact with technical support, trying to determine why even the simplest applications would not run. It turned out I was one of the first customers for the kernel, meaning I ended up as an unintended beta tester.

At a dead end, I returned to the more expensive product I was familiar with, and was quickly running simple applications. It wasn’t long until I found myself at another impasse, as the new operating system seemed to contain a bug. Upon reporting it, I was notified that the 90-day warranty had expired, so I had to purchase a maintenance contract. Even with a contract in place, the vendor took six months to remove the bug. All told, I completed my ignition system a year after purchasing the software.

While all this was happening, I began to develop my own kernel. At the time, I naively believed that all a kernel really did was to save and restore CPU registers, so writing one should not be especially challenging. Asking myself, “How hard can it be?,” I worked on the kernel at night and on weekends. Although I shouldn't have been surprised, it proved to be much more difficult than I anticipated. Approximately a year after starting the project, my first RTOS was complete. I picked the name μC/OS, which meant “microcontroller operating system,” using the Greek letter “mu” to mean micro.

μC/OS was designed according to the stringent standards that I created and promulgated at Dynalco. The operating system’s source code featured liberal spacing, carefully worded comments and consistent naming. Offering further evidence of the prudent coding techniques, the kernel was also highly portable. Although μC/OS, like its kernel peers, featured a small number of processor-specific functions, these routines were clearly separated from other portions of the operating system. This meant that engineers could easily adapt μC/OS to new CPU architectures. The coding standards implemented for uC/OS have remained in place to this day.

Embedded Systems Programming (1992)

Embedded Systems Programming (1992)

As is often true with new products, I was the only one aware of the virtues of μC/OS. Eager to describe my new software to others, I wrote a paper explaining the inner workings of μC/OS, which was published in Embedded Systems Programming magazine in the May and June 1992 issues. Engineers were grateful that the inner workings of a high-quality kernel were revealed, and they downloaded the μC/OS source code in droves. Soon thereafter, R&D Publications, publisher of C Users Journal, expressed interest in publishing an entire μC/OS book. In late 1992, the full book, aptly titled “μC/OS: The Real-Time Kernel,” was released, and eventually went on to sell more than 15,000 copies.

The original uC/OS RTOS book.

The original uC/OS RTOS book.

For several years, only minor changes were made to μC/OS, since stability is always key for a kernel. However, there were new features that needed to be added, so I decided that a substantial update of the operating system (and the book) was warranted. This updated operating system became μC/OS-II, which offered many features that its predecessor lacked, including stack-checking capabilities, hook functions and a safe means to dynamically allocate memory.

In 1998, the new edition was released under the title “MicroC/OS-II: The Real-Time Kernel.” A little known fact is that the title changed from “mu” to “micro” because of the publisher’s requirements. At nearly double the length of the first book, the new text was accompanied by the source code, meaning thousands of developers were able to test the kernel and provide valuable feedback.

The second uC/OS RTOS kernel book: MicroC/OS-II.

The second uC/OS RTOS kernel book: MicroC/OS-II.

Soon after the book’s release I founded Micrium to commercialize the kernel. On the one hand, the book drove development of a number of university courses around the source code. On the other, an increasing number of engineers were using μC/OS-II commercially, notably because of its reliability. Definitive proof of this came in July 2000, when DO-178B Level A certification was conferred on an avionics product incorporating μC/OS-II. This certification, recognized by the Federal Aviation Administration, is awarded to software deemed safe enough to be used in aircraft. Additional certifications for μC/OS-II followed, including Food and Drug Administration premarket notification (510(k)), premarket approval for medical devices and IEC-61508 for industrial controls. To this day, there are few operating systems that have successfully completed the rigorous testing that certified software must undergo.

In 2008, 10 years after the introduction of μC/OS-II, a third iteration of the μC/OS family was added: μC/OS-III. Once again, the RTOS was accompanied by a new book, designed to be even more useful by including the kernel description, examples targeting specific MCUs and manufacturers, as well as leveraging a low-cost evaluation board to accompany the examples as well as a toolchain (compiler, assembler, linker) that could be obtained for free.

The series of uC/OS-III RTOS kernel books

The series of uC/OS-III RTOS kernel books offer example projects.

This meant that, not only could readers learn about the inner workings of an RTOS, they could also try one on real hardware. Based on feedback from μC/OS-II users, the μC/OS-III RTOS contained significant improvements and features. For example, it supports multiple tasks at the same priority, true-priority inheritance mutexes, the ability to directly signal a task, send messages to a task and much more. In May 2015, Validated Software announced the availability of certification artifacts for μC/OS-III, demonstrating that it too can be used in safety-critical applications.

In October 2016, Silicon Labs acquired Micrium, starting another new chapter in the Micrium story. Together, we remain committed to supporting all μC/OS-II and μC/OS-III customers, irrespective of the MCU or CPU manufacturer they use. Twenty-five years ago, I couldn't have imagined where my “spare time” project would lead, but I wouldn’t trade it for anything. I’m honored to have written a kernel that has contributed to educating so many engineers within the industry, and I look forward to continuing to educate the industry on coding best practices and the benefits of using RTOS kernels.

Tags: , , , ,

Questions or Comments?

Have a question or a suggestion for a future article?
Don't hesitate to contact us and let us know!
All comments and ideas are welcome.