What is the NuttX RTOS and why should you care? - Embedded.com

What is the NuttX RTOS and why should you care?


There is a plethora of Real Time Operating Systems (RTOSes) available on the Internet (Click Here to see a “small” list). Many of these offerings, however, are now dead/unmaintained projects.

Of those remaining, most have support for only one microcontroller or one microcontroller family. Filtering yet more, you will see that even the ones that do support multiple microcontrollers typically don't have all the features you need: USB, Ethernet, Wi-Fi, 6LoWPAN, Graphic LCD, SD Card, FAT File System, CAN Bus, RS485, etc.

By comparison, the NuttX RTOS supports all of these features and everything is already integrated in the system. For example, you don't need to spend your time porting a FAT File System to get it working on RTOS, or FreeModBus, or Micropython, etc. Everything is already included in the package and you don't pay anything more for it. Wait! I said “Pay?” In fact, you don't need to pay anything because NuttX is a completely Free and Open Source RTOS. It uses a BSD license, so no special clauses or GPL exceptions exist.

NuttX is a POSIX RTOS. You don’t need to learn a new API to program it. You can write an application in a POSIX Operating System like Linux or MacOS, validate it, and then compile it to run on NuttX. If you don't want to create an application from scratch, you can grab some small Linux libraries and perform some minor modifications to get them working on NuttX.

NuttX also has many subsystems that resemble equivalent subsystems in Linux. For instance, Virtual File System (VFS), Memory Technology Device (MTD), Audio subsystem, USB system with USB Composite support, and many others. Although similar in features, they have a big difference (or should I say a “small difference”?), because NuttX is inherently small. Actually, you can run a basic version of NuttX on low cost microcontrollers with less than 32KB of Flash and less than 8KB of RAM. Of course, if you want to include additional features in your firmware — USB, Ethernet/WiFi with IPv6, CAN, etc. — then it will be better to use a microcontroller with more than 64KB of Flash and at least 32KB of RAM.

All these facts explain why many companies are already using NuttX. Have you heard about the Moto Z smartphone? User can attach smart covers (called Snaps), thereby turning their phones into Digital Projectors, True Zoom Cameras, Sound Systems, or anything else they want. Would it surprise you to hear that these Moto Z Snaps are running NuttX!Furthermore, Sony is producing audio recorders and other devices with NuttX; Samsung is using NuttX (or a fork of it, since they changed its license from BSD to Apache2) in their new TizenRT; 3DRobotics is using NuttX in their drones (or UAVs as some people prefer to say in order to avoid confusion with military versions); and many, many other companies are deploying NuttX in their products.

It is also important to note that NuttX is in no way a “new kid on the block.” The first NuttX version was released more than 10 years ago (Feb 2007). The mastermind behind NuttX is Gregory Nutt (Linus → Linux ; Nutt → NuttX; what a coincidence!). Greg spent many years developing embedded systems for aerospace companies and for HP Printers. He also worked developing Linux embedded systems for many companies (e.g., AMD, ATI, Motorola), and was co-founder of a company that developed Linux embedded systems in the early of 2000s. Thus, when Greg looked around and noticed that a small RTOS with a POSIX pedigree was missing, he decided to make it happen.

Why haven't you heard about NuttX until now? Well, this may due to the fact that Greg was so busy working on this project that he didn’t have the time to promote it. Fortunately, the system is becoming increasingly popular due to its rich feature set. The recent addition of 6LowPAN, for example, makes NuttX a natural option for complex IoT systems where sophisticated communications features are required.

So what are you waiting for? Now it's your turn to pull a rabbit out of the hat.

How to get started with NuttX:

Alan Carvalho de Assis graduated in Computer Science and holds a Master's Degree in Electrical Engineering. Alan started working with embedded systems in 1998 (PIC MCUs) and with embedded Linux (uCLinux) in 2001. He worked developing Linux embedded systems at Freescale (now NXP) and other local companies in Brazil. In 2010 he discovered NuttX RTOS while reading an article in the Linux Journal and started using it to develop projects for many different companies. Alan would like to thank Rich Pennington and Marcelo Barros for helping him to revise this article.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.