news

Support for New Operating Systems on Espressif SoCs

Shanghai, China
Oct 29, 2021

NuttX and Zephyr are now supported on the ESP32, ESP32-S2, and ESP32-C3 series of SoCs. Check out how it all happened!

Due to ESP32's rich feature set and broad range of IoT applications, Espressif's flagship SoC has become an important device that has changed the IoT landscape. Additionally, with ESP-IDF, developers can build embedded software with ease. ESP-IDF offers an off-the-shelf set of libraries, protocols and solutions that allow developers and companies to build powerful connected products. Most importantly, it is open-source, meaning we, at Espressif, are constantly in an open dialogue with the users of our products. After receiving several requests for support in two particular operating systems, NuttX and Zephyr, we can now offer just that.

Introduction to NuttX

NuttX (or Apache NuttX) is a project hosted by the Apache Foundation, which is used by many big manufacturers, either as a fork (Tizen and VelaOS) or directly. Initially, the need for a POSIX-compliant RTOS for small (i.e. 8-bit) CPUs was fulfilled when Greg Nutt decided to tackle this challenge (hence, NuttX). Today, NuttX is the RTOS of choice for those who want to have a POSIX experience, while still being able to use a small CPU/MCU.

On NuttX, the main focus is architectural integrity. “Foreign” code is not allowed, unless it is rigorously inspected, and libraries are carefully selected. For example, no direct use of manufacturer APIs and HALs is allowed when they diverge from the accepted coding standards. This means that NuttX puts integrity above everything else, which is based on the rationale that good code, without shortcuts, leads to an increase of productivity in the long run.

Introduction to Zephyr

Zephyr is an RTOS that has broad hardware support and the ability to build powerful applications. Therefore, there are major players in the Zephyr scene, who eventually serve as the best advocates for the project.

The Zephyr roots can be traced in the Rocket RTOS from Wind River, which opened its RTOS source in 2015. In 2016, Zephyr was hosted by the Linux Foundation, which further accelerated the collaboration between all involved parties. In fact, the notion of collaboration became the main focus of the project, so that users and vendors alike were able to port Zephyr to their systems.

A fairly recent, yet key, aspect of Zephyr is that, along with its broad hardware support, Zephyr enjoys a large user base, as well. It is estimated that it already has more than 1,000 contributors, including big players. This also attracts a large number of service providers and contractors who then help new, adopting companies to get to production faster. This has resulted in more than just a community or a project; Zephyr has become a whole ecosystem.

ESP32 Support

We, at Espressif, are consistently focused on introducing the ESP32 series of SoCs to different operating systems. At the same time, we understand that joining a community around an open-source project requires attention to the community work, its rules, its open-source etiquette, etc. That’s why, since joining the NuttX and Zephyr communities, we have been constantly developing our support for ESP32 on the above-mentioned operating systems.

Our support strategy has been pretty straightforward from the beginning. Since ESP32 is a Wi-Fi MCU, we focused on minimal MCU support first (CPU), then we moved to Wi-Fi, and then to other basic peripherals. This way, developers started testing our chips, and giving us valuable feedback. We took that feedback with an open mind, which helped us to prioritise the features that were deemed more important by the community.

Espressif’s current support for NuttX and Zephyr can be summarized in the table below*:

* Legend explanation
  • Yes (green): the feature is supported
  • No (red): the feature is not supported
  • N/A (white): not available to that device/OS
  • WIP (yellow): work in progress
  • Conditional (yellow): supported under special conditions / specific use cases
  • Beta (sky blue): draft implementation available

Apart from device support, we still have certain system challenges to tackle: we want users to be able to build powerful products with different operating systems, just like they can do when using ESP-IDF. Meanwhile, it is important to consider that there are several Espressif SoCs to be released soon, which brings us to our future plans.

ESP32 Roadmap

We plan to add as many features as possible, but we think that a more realistic approach would be more helpful; one that will actually benefit users and the community the most. To this end, the major areas in which we shall further improve our ESP32 support are: i) low-power mode, ii) Wi-Fi and iii) the ever-trending issue of security. At the same time, we shall continue adding new devices to our portfolio and more peripherals to the list of supported features. Our plans can be summarized in the table below.

We already have several successful cases of projects using Zephyr and NuttX on ESP32 devices. Take the MCUboot project for example. We started working on it for Zephyr and we managed to port it to NuttX, as well. This has prompted several service providers to start considering support for NuttX on their Clouds, which is arguably great for that community. Additionally, Espressif was the first on-chip Wi-Fi MCU to be supported on Zephyr, thus paving the way for future Zephyr Native Wi-Fi Stack projects.

Currently, after over a year of hard work, we have started getting feedback from customers who say they are with us now, because ESP32 works reliably with their favorite operating system. Such comments give us strength to continue. While acknowledging that we still need to take several steps forward, we extend an invitation to all our users to send us their feedback, so that we can jointly shape our future projects.

More Resources:

  • Do you want to try ESP32 with Zephyr? You should check out this tutorial.
  • Or, perhaps, you might want to try NuttX instead? We've got you covered here.
  • Maybe you have heard about MCUboot? Check out a video presentation here.
  • Is there a graphical application on NuttX for ESP32? Check out this LVGL tutorial.
  • Could it be that you’d like to test the Zephyr and Wi-Fi capabilities of ESP32? There you go!
Share this article
  • LinkedIn
  • 微信

    微信分享

    打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
Reuse this content

Ioannis

Technical Writer and Editor

About this author ›