Real-time Embedded Linux and POSIX RTOSs For Microcontrollers (MCUs)

Tuesday, April 28, 2009

RTOS Software Reuse - Simply A Myth For Microcontrollers

It amazes me that many users don't realize the power of reusing software that someone else has spent hours, days, months or even years optimizing and testing. By using a simple set of criteria, developers of the next generation of embedded systems can eliminate 80% or more of the work.

Today, for microcontrollers, users often code everything from scratch. They are going with what they understand; however the world of microcontrollers has changed quickly. Memory is more plentiful and using an embedded operating system saves huge amounts of effort. Yet many do not get it - these are smart people but they are used to banging bits and crafting a few lines of software rather than larger complex systems.

Their problems are created in part by the noise in the marketplace. There are many "real time operating systems" but many offerings are not even operating systems. There is a lot of I/O, extra libraries, testing, documentation and integration that goes into a complete operating system. It takes scores of test suites and thousands of hours of work to make sure that the system is reliable and easy to use while still conforming with industry standards. And yet users choose to do this themselves at great risk and expense rather than reuse available solutions.

Some situations are humerous. I was recently in a forum where kernel vendors were debating one narrow aspect of performance like this was a major consideration in the system design. They were ignoring all other aspects. Surely any system must be evaluated on the basis of all the various features and processing capabilities that it offers. Some systems will be better for some things and some for others. Experienced embedded designers understand this.

The thing that amazes me the most is that in the microcontroller world, narrow performance benefits are touted as a major advancement at the same time these vendors are discarding tens of thousands of programs and millions of lines of code that could be effortlessly reused. For this reason, standards like POSIX and Linux along with software reuse are paramount. We offer this
but don't take our word for it - check out the largest vendor too and see what they offer now, albeit on larger processors!

The criteria to eliminate most time and risk for microcontroller development are really very simple: portable C code, an operating system standard (the broader the better) and as much off the shelf software as possible including a complete RTOS. It takes no more than that to be a hero in your organization.