Blog

Back to News

Announcements

Blog

Events

Shipping the Zephyr RTOS in Consumer Electronics Products

By | Blog

Written by Matt Fleming, Director of Read Modify Write

Baylibre collaborates with manufacturers of consumer electronics, providing custom firmware solutions and specializing in Linux-based IoT devices. We’ve worked on several embedded consumer products using the Zephyr Project, including the Sensor Hub in the Blocks modular smartwatch and Ellcie Healthy glasses, and the Embedded Controller for the Gnarbox.

When choosing our Real Time Operating System (RTOS) for these projects, we had a quite a few options because the RTOS market is increasingly fragmented. Top of our priority list was a project using a permissive license, and providing a free solution. This eliminated FreeRTOS from consideration since it was still under a GPL or proprietary license at the time. Mbed OS was another contender, but we felt it was too dependant on the Mbed ecosystem. We considered using NuttX or building a bespoke OS, but ultimately decided that Zephyr best met our needs.

Zephyr is an RTOS hosted by the Linux Foundation. It is scalable, supports multiple hardware architectures, is optimized for resource-constrained devices (everything is statically allocated), and built with security in mind. Collaboration is also actively encouraged, from individual coders to major companies contributing. We liked that it is similar in many ways to Linux (in its coding style and build process), has a strong community focus, and fantastic documentation. The permissive Apache 2.0 license was also an advantage.

Zephyr’s release cycle is three to four months, with (approximately) an 11-week merge window and 3-week stabilization period. Each release is a combination of planned new features and community contributions.

Those community contributions meant that Zephyr gave us a lot of what we wanted out of the box, and made it easy for us to upstream the elements we added for our customers’ products: support for the STMicroelectronics STM32L4 and STM32F0 MCUs. STM32F1 was already supported, so we were able to copy that example, simplifying our development work. That also made porting very fast. We completed a basic port in a day and a half, and a fully-tested port in less than one week.

Overall, we found Zephyr to be well-structured and simple to use. Most of the port time was spent on I2C/SPI testing. Once porting was complete, the Zephyr upstreaming process was straightforward. We:

  • Read the contribution guidelines
  • Cleaned up our patch to follow Zephyr’s coding standards (with help from uncrustify)
  • Verified that the patch met the coding standards using checkpatch
  • Committed our changes to github
  • Awaited reviews

Fortunately, the Zephyr project provides a community of reviewers and we were able to contact the maintainers on the Zephyr IRC channel to assist with getting patches merged.

Despite challenges during the review process, overall we found Zephyr easy to get started with thanks to its similarities to Linux, thorough documentation, and an active community. This RTOS’s design is good for low memory usage, and as the software and development processes evolve with growing community input and support, flaws are quickly fixed.

If you’d like to hear more about our experience with Zephyr to power consumer electronics products, check out our presentation from Embedded Linux Conference 2017: https://www.youtube.com/embed/XUJK2htXxKw.

 

 

Meet Thea Aldrich!

By | Blog

Written by Thea Aldrich, The Zephyr Project Evangelist and Developer Advocate

“I may not have gone where I intended to go, but I think I have ended up where I intended to be.” (D. Adams)

The power of open source is a beautiful thing. Collaboration, transparency and free access to information creates opportunities, fosters innovation and broadens the realm of the possible. I discovered this when I joined my first open source project almost a decade ago.  Since then, I’ve dedicated most of my professional career towards assisting communities with the practical aspects of building and maintaining a sustainable ecosystem around their open source code or data. Over the years, I have had the privilege to work with communities of all sizes and focus areas. With each project, I learned about new tools and discovered new passions. It’s been an adventure with a lot of  unexpected twists and turns.

Today, I am thrilled to announce I have officially joined The Zephyr Project. I will  support and grow the developer, user and commercial ecosystem as a project evangelist and developer advocate. In this role, I will be working on a number of developer-focused initiatives and activities dedicated towards ensuring that Zephyr continues to be a diverse and vibrant community.  

So how did I end up here? The Zephyr Project sits at the intersection of my personal and professional interests. Professionally, I will be able to directly support an incredible open source community that also aligns with my personal interests. A few years ago, while working as a geospatial developer advocate, I began playing around with simple connected devices and reading about the sensors feeding data to geospatial platforms. Around the same time, unrelated life events spurred a move to rural NE Texas where, through a failed first attempt at raising my own beef, I became the proud owner of 4 pet jersey steer. With zero previous livestock experience, I was understandably curious what they were doing all day. So I bought a bunch of sensors, read a lot of Getting Started guides, and began trying to use homemade wearables to monitor the steers.

Long story short, it’s all fun and games until you realize your brilliant idea will require someone to catch a full grown steer every four hours to change the battery pack. It was through researching solutions/completely redesigning that I discovered The Zephyr Project.  Zephyr OS solved or improved the odds of solvability of many of the technical issues I was encountering. Not only that but it was open source AND had a welcoming community with clear governance! Needless to say I stumbled upon something more than just an RTOS and I could not be happier to have the opportunity to contribute to this community.

Thank you to everyone who has already so warmly welcomed me. Over the next few months you will be seeing me online and at events.  Please feel free to introduce yourself, ask questions, share what you are working on and get involved in The Zephyr Project. I am looking forward to working with you all.

For more information on what I am up to follow me on Twitter at @TheaClay and watch the Zephyr blog and follow @ZephyrIoT for the latest project news and updates.

The Zephyr Project Steps into the Spotlight at ELC + OpenIoT Summit

By | Blog, News

Last month, The Zephyr Project participated in The Linux Foundation’s Embedded Linux Conference + OpenIoT Summit North America in Portland, Oregon. Around 730 embedded and IoT technologists from 360 companies and 31 countries around the globe attended the event to collaborate with experts on a wide range of topics of embedded Linux and industrial IoT issues. This was an increase from last year, making this an important industry event for embedded and IoT developers with 12 keynotes and some 90 breakout sessions. In fact, 75% of attendees have already said they are planning on attending next year.

The Zephyr Project had a strong presence at the show. Jonathan Corbet, Author, Kernel Developer and Executive Editor of LWN.net, mentioned Zephyr OS during his keynote for ELC. He mentioned how more developers are using Zephyr RTOS because of its small lightweight permissively licensing system and how open source projects like this one is the future of technology. You can watch the video of Jonathan’s keynote here.

Jonathan Corbet on stage during his keynote

 

The Zephyr Project, which was a Bronze sponsor for the show, had a booth in the technical and demo showcase. Featured demos included ones from Open Source Foundries, which showcased the LWM2M Device Management, LWM2M on AT&T LTE, which demonstrated the latest Zephyr code and LWM2M working over AT&T’s LTE network and Bluetooth Mesh in action on BBC micro:bit boards.

Demos at the Zephyr booth

 

Each day of the conference, the showcase hall was packed with attendees who wanted to learn about the latest projects and products, view hands-on demos and interact with other community members. 98% of attendees survey said they visited sponsor booths.

Zephyr members and experts on the first day of the show

 

Additionally, around 20 Zephyr technical experts attended the event from companies including Intel, Linaro, Nordic Semiconductor, Synopsys and Open Source Foundries, to present sessions related to Zephyr development and collaborate with other projects. Please see below for a few of the Zephyr sessions and links to the presentations:

Zephyr LTS Release: What to expect and why are we doing this

Anas Nashif, a Software Architect for Intel’s Open Source Technology Centre, presented a session that discussed the features of Zephyr LTS, such as stable APIs and the goal of taking a subset of the released project code through various certification activities, and next steps. The presentation can be found here.  

Zephyr and MCUBoot as Foundations for Secure IOT Products

Marti Bolivar, a Senior Engineer for Open Source Foundries, gave a talk about Zephyr and MCUBoot as Foundations for Secure IoT Products. This talk describes a concrete, open source IoT application based on Zephyr, MCUBoot, and LWM2M, as well as the developer tooling and security model underlying it. It focused on the practical application of these tools, rather than an abstract discussion of the components themselves. The presentation is available for review here.

Bluetooth Mesh

Johan Hedberg, a Senior Software Engineer for Intel, showcased how Bluetooth Mesh works with Zephyr OS and Linux. The presentation gave an introduction to Bluetooth Mesh, covering how it works and what kind of features it provides, as well as an overview of how it is supported in Zephyr OS and Linux and how to create new wireless solutions with them. See the presentation here.

Building IPv6 Mesh Network with Zephyr OS

Ravi Kumar Veeramally, a Software Engineer for Intel, gave a presentation about building IPv6 mesh network with Zephyr OS. This presentation detailed how to make use of Zephyr networking to utilize multiple interfaces (Ethernet and 802.15.4) and form a mesh network and control leaf nodes in the network. An 802.15.4 interface forms an RPL mesh network and Ethernet interface provides a web interface that shows and controls the mesh network leaf nodes. The web interface also displays the topology of the mesh network. Technologies involved here are Ethernet and 802.15.4, 6lowpan, IPv4/6, RPL, TCP, UDP, HTTP, Websocket and CoAP. See the presentation here.

Zephyr™ Now Supports OMA LwM2M protocol! What Can It Do For Me?

Michael Scott, an Embedded Software Engineer for Open Source Foundries, offered an interactive discussion about how Zephyr OS now supports OMA LwM2M Protocol and what that means for developers. He shared how the library has evolved from the 1.9 release through what’s available in the master branch of Zephyr today (to be released as 1.11) as well as broke down typical hardware configurations and instructions for testing the Zephyr LwM2M client via QEMU and connecting to a LwM2M server. See the presentation here.

Retrofitting Zephyr Memory Protection

Andrew Boie, a Senior Software Engineer for Intel, shared a presentation about how to retrofit memory protection in the Zephyr OS. This talk presented the work performed to retrofit memory protection in the Zephyr kernel, discussing the constraints, design decisions (affecting portability, security, and performance), its current state, and the next steps. He discussed details on a novel method of tracking and validating kernel objects, techniques for defining system calls with a minimal amount of boilerplate code, details on our APIs for managing memory permissions, and implications of the recently unveiled Meltdown and Spectre bugs and their implications for Zephyr. See the presentation here.

Flexible IoT Solutions using Zephyr and JavaScript

Brian Jones, a Software Engineer for Intel, offered a look at how flexible IoT solutions use Zephyr RTOS and JavaScript. He details the core concepts, use cases, and demos to illustrate how it all works. The presentation is available for review here.

Photos from a few of the Zephyr sessions

 

Overall, the Zephyr Project was well represented at ELC OpenIoT Summit. If you missed it, you can catch Zephyr at the next conference. Zephyr will be at LinuxCon China, which is co-located with ContainerCon China and CloudOpen China on June 25-27 at the China National Convention Center in Beijing. See below list of topics Zephyr will be presenting:

Retrofitting Memory Protection in the Zephyr OS – Wayne Ren, Synopsys

On Monday, June 25, Wayne Ren, a Senior Software at Synopsys, is doing a talk about Retrofitting Memory Protection in the Zephyr OS. Click here to add it to your schedule.

Introduction to the Zephyr Project – Ryan Qian, NXP & Kate Stewart, The Linux Foundation

On Tuesday, June 26, Kate Stewart, Senior Director of Strategic Programs for The Linux Foundation, and Ryan Qian, a software Engineer at NXP, will provide an Introduction to the Zephyr Project. Click here to add it to your schedule.

Stay tuned for more and come see us at LinuxCon China!

Let the party begin: Zephyr OS 1.11 is here!

By | Blog, News

Today, the Zephyr Project is happy to announce a new release of the Zephyr Open Source RTOS for embedded devices, version 1.11.

The breakneck pace of development has not stopped, and this new release introduces multiple features and enhancements that take Zephyr closer to its goal: to be the RTOS of choice in the embedded industry for companies and makers alike.

Among the headline features in this release, we are proud to introduce a native Microsoft Windows development environment. While many Zephyr users develop on UNIX-like platforms like GNU/Linux and macOS, we are fully aware that a lot of embedded developers rely on and trust Microsoft Windows as their operating system of choice. As a result, we have been building up support for it over the last few releases leading to this present one, which is the first to be completely buildable on Microsoft’s popular platform. Instead of relying on emulation layers to ensure maximum performance and seamless interaction with other native development tools, we rely on the power of the CMake build system and the Python scripting language to deliver a build system that is scalable, future-proof and completely cross-platform.

Additionally, this release introduces a new connectivity technology originally designed by Google and Nest, the Thread protocol. This has been a longstanding requested feature, and we have integrated the popular OpenThread implementation into Zephyr, allowing users to seamlessly interact with Thread networks using the already familiar Zephyr networking APIs and reusing the existing 802.15.4 drivers available.

A few high-profile features have percolated from “big”, full-blown operating systems into Zephyr in this version: Symmetric Multi Processing (also known as SMP) is now available for the Tensilica Xtensa architecture, allowing the kernel to run on more than one CPU core concurrently. In the same line, the already existing support for thread-level memory protection, previously available only on the x86 architecture, now can be enabled on the Arm and ARC architectures.

Additionally, IEEE POSIX support for the PS352 (Realtime Controller Product Standard) profile is nearing completion, with the majority of the APIs now covered. Zephyr does not intend to overlap in features and functionality with GNU/Linux, but these additions help transition existing codebases to embedded microcontrollers.

Sometimes developers do not want to go through the “modify, build, program” cycle in order to iterate quicker on a new piece of code that they might be working on. The new “native POSIX” board allows Zephyr to be compiled as a native Linux application, and debug it using the vast array of tools available to Linux application developers. This not only helps when coding and debugging new features, but it can also be used to profile and examine in detail execution paths and memory usage. It essentially turns embedded software development into desktop application development, and is a nice complement to our already existing QEMU emulation support.

Finally, one of the most requested features has made its way into the project: over-the-air device firmware upgrades (OTA DFU) using Bluetooth Low Energy.  The integration of a new framework to support this (MCUmgr) alongside the familiar MCUboot bootloader allows Zephyr images to be sent and programmed over a BLE connection, as well as adding a management layer that is able to access the filesystem and retrieve kernel statistics remotely.

We invite you to download Zephyr 1.11 today and try out all the exciting new features along with many others (initial Armv8-M support, a new lightweight storage layer, additional boards supported) that would be too long to list here. Your feedback is extremely welcome in our path to make Zephyr better than ever.

Download the Zephyr 1.11 here: https://github.com/zephyrproject-rtos/zephyr/releases

A sincere thank you to all those in the community who contributed. This release would not have been possible without your contributions!

Additional Zephyr resources: