Zephyr RTOS 2.1 Release Highlights

Written by David Leach, Software Architect at NXP Semiconductor and member of the Zephyr Technical Steering Committee

Last month, the Zephyr Project announced the release of Zephyr RTOS 2.1. A long list of enhancements and bug fixes contained in Zephyr 2.1 can be found in the release notes

Major Enhancements

·         Normalized APIs across all architectures.

·         Expanded support for ARMv6-M architecture.

·         Added support for numerous new boards and shields.

·         Added numerous new drivers and sensors.

·         Added new TCP stack implementation (experimental).

·         Added BLE support on Vega platform (experimental).

·         Memory size improvements to Bluetooth host stack.

The Numbers

This release is the result of the hard work and skill of over 350 individuals engaged with the project over the last 3 months with over 1500 PRs merged and 532 issues closed. We would like to thank all those who engaged with the project both in front and behind the scenes to help improve the Zephyr Project for this release.

Sample boards that now have support

What’s Next

Improvements to Zephyr Project never stops. Work continues on the new TCP stack implementation, many different activities with Bluetooth, converting GPIO drivers to the new GPIO API,  and many other enhancements and bug fixes.

Join Us

We invite you to try out Zephyr 2.1. You can find our Getting started Guide here.  If you are interested in contributing to the Zephyr Project please see our Contributor Guide. Join the conversation or ask questions on our Slack channel or Mailing List.

Top 5 Highlights from Zephyr TSC Meetings in Lyon

By Maureen Helm, Chair of the Zephyr Project Technical Steering Committee

The Zephyr community converges every year at the Embedded Linux Conference Europe, and 2019 was no exception. This year we traveled to Lyon, France for an engaging week full of technical talks, spontaneous hallway conversations and hacking sessions, team dinners, and perhaps a nice glass of wine or two. It was a wonderful opportunity to get to know some of our newer members in person and finally put faces to familiar names and voices.


After the main conference, the Zephyr technical steering committee stayed on for two days of face-to-face meetings, including a few dial-ins from those who couldn’t make the trip. Compared to our weekly calls, the longer format F2F meeting allowed us to discuss and debate issues in greater depth, and make decisions about the technical direction of the project.

#1 – Mainline releases: Historically we have aimed for quarterly releases, but will shift to a 4-month cycle in 2020. More details, including dates, are in the Program Management wiki page.

#2 – LTS releases: We clarified that LTS releases will be maintained for two years, and LTS2 will be released approximately two years after LTS1. We did not decide on a cadence beyond LTS2.

#3 – Toolchains: We agreed that multiple members have an interest in supporting commercial toolchains and will kickoff a new toolchain-focused working group.

#4 – User Experience: We brainstormed possible solutions to common problems encountered by new developers.

#5 – Roles and Responsibilities: We debated a contributor ladder towards maintainership, how to distribute merge rights, and how to fill the release manager role for future releases. This conversation has continued in subsequent process working group meetings.

Thank you to everyone who joined, and I look forward to seeing you next time at the Embedded Linux Conference in Austin, Texas!

OSPERT 2020 Workshop at ECRTS JULY 7, 2020

The 16th Annual Workshop on Operating Systems Platforms for Embedded Real-Time Applications will be held at ECRTS 2020 in Modena, Italy from July 7-10, 2020. The OSPERT workshop itself takes place on July 7.

OSPERT is a satellite workshop of the 32nd Euromicro Conference on Real-Time Systems (ECRTS 2019), the premier European venue for presenting research into the broad area of real-time and embedded systems. OSPERT is open to all topics related to providing a reliable operating environment for real-time and embedded applications.

The Linux Foundation’s Kate Stewart will give a keynote on July 7 about the RTOS landscape and how Zephyr is the leading RTOS for IoT and embedded devices. 

Stay tuned here for more details. For more information about the conference, please visit the ECRTS website.

Embedded World FEBRUARY 25, 2020 – FEBRUARY 27, 2020

Embedded World 2020 takes place on February 25-27, 2020 in Nuremberg, Germany. Now in its 18th year, the conference covers all aspects of the development and application of embedded systems, from fundamental technologies to development processes and special fields of application. With nearly 2,000 participants and 31,000 visitors the conference has over the years become an international meeting place for the professional embedded developer community.

Zephyr will be on display on the show floor again this year. Several Zephyr project members will be on-site in booth Hall 4-170. More details coming soon….

In addition to the booth, several of the Zephyr Project leaders will be giving presentations.

On Wednesday, February 26:

At 11:30 – 12 pm, Prof. Robert Oshana with NXP Semiconductors, will give a presentation titled, “Practical Software Testing Techniques and Guidelines for Embedded Systems.” Embedded technology has revolutionized sectors of the industry in ways that were previously never thought possible. For this reason, product testing is becoming increasingly important. Ensuring that our embedded technology functions properly is a priority for most companies, regardless of where that technology happens to be located. In this presentation we will explore white box and black box techniques for testing embedded systems, talk about system and performance testing, and summarize some of the unique testing requirements and approaches for real-time embedded systems. Topics include static and dynamic analysis techniques, exploratory testing, equivalence partitioning and boundary value analysis, and hueristics based testing methods.

At 12:30-1 pm, Kate Stewart with the Linux Foundation will give a presentation titled, “Safety Certification and Open Source – Can They Work Together?” 

The last 20 years have seen a tremendous surge of new technologies and capabilities emerge from open source software. These open source building blocks have become increasingly attractive as the base for innovative new products. Safety critical applications are now using them as well, but we lack infrastructure to assess when this software is safe to use, that can keep up with the rate of change of open source development. Her talk will look at some of the challenges and approaches to building trust and confidence in open source used in safety critical software coming to new products. The approaches taken by 3 open source projects (Linux, Xen, Zephyr) will be discussed and contrasted.

At 12:30-1 pm, Pal Kastnes with Nordic Semiconductor, will give a presentation titled, “Bluetooth Security – A Technical Overview & Implementation Guide for Embedded Developers.” The Bluetooth specifications enable advanced security features to accommodate a wide variety of embedded applications and systems. This session will provide implementation guidelines to help embedded developers understand the range of security options available when developing with Bluetooth, as well as some best practices to follow when securing Bluetooth devices and solutions.

At 4-4:30 pm, Martin Woolley with Bluetooth SIG will give a presentation titled, “Bluetooth Location Services and High Accuracy Direction Finding.”Bluetooth can be used for many types of location service and it’s an area forecast to experience the biggest growth in the next few years, with 431 million location related devices shipping in 2023. In 2019, Bluetooth acquired a new capability which allows the direction of a signal to be accurately determined using one of two methods known as Angle of Arrival (AoA) or Angle of Departure (AoD). Come to this session and hear about this Bluetooth location services and the new direction finding feature, how it works and the uses it’s likely to be put to.

At 4-4:30 pm, Prof. Robert Oshana with NXP Semiconductors, will give a presentation titled, ” Guidelines, Tips and Tricks for Managing Open Source Software for Embedded Systems.” Open source software is ubiquitous in embedded computing. Whether you are using the Linux or Zephyr operating system, open source machine learning components, or any other form of community based software, its important to understand the basic guidelines and principles for developing and managing open source software. This presentation will use multiple actual industry examples to demonstrate practical tips and tricks for open source software development. Topics include developing an open source policy, understanding the basics of licensing open source software, how to update promptly, using a binary repo manager, how to particpate in the community and upstream software, how to use the proper build tools, tips for how and when to fork, and other practical examples. With the right framework and understanding, open source development for embedded systems can be more efficient, and less risky and error prone for the developer and the organization.

At 2-2:30 pm, Prof. Robert Oshana with NXP Semiconductors, is giving a presentation titled, “RISC-V Hardware and Software Technology for Industry.”  RISC-V is a free and open ISA enabling a new era of processor innovation through open standard collaboration. The RISC-V foundation now has close to 300 member companies and universities, and growing. This talk will focus on the state of the technology for RISC-V. We will discuss the latest developments in the RISC-V foundation regarding technology development, discuss some of the new communites like openHW Group that are dedicated to creating high quality open source RISC-V implementations for the masses. We will discuss industry adoption of RISC-V, using actual examples of how to incorporate RISC-V into a corporate design flow. We will discuss what is being done to manage hardware and software fragmentation in this growing community, and the state of the RISC-V ecosystem. We will show examples of how to innovate by using the powerful instruction extension capability of the ISA.

For more about the conference, visit the website.

Zephyr – An Operating System for IoT

Written by Ivo Clarysse, CTO at Blue Clover Devices

This blog previously ran on the Blue Clover Devices website. You can view the website here.

IOT OS LANDSCAPE

These days there’s no lack of operating systems to choose from for embedded systems; Wikipedia counts about 100 of them. The Eclipse survey still shows Linux leading the pack, with Windows, FreeRTOS and Mbed OS being widely used as well.

For devices that have the necessary resources, full-blown operating systems like Linux (Android) or Windows dominate the field, but for more constrained devices, there’s a wide range of systems being used.

The Eclipse IoT Developer Survey 2019 shows more use of actual operating systems in IoT device firmware, as opposed to bare-metal programming or building on top of a minimal kernel.

Linux is widely used for IoT applications, but requires at least a Cortex-A MCU (or equivalent), and is not the preferred choice for more limited systems, such as Cortex-M.

FreeRTOS is quite popular in the embedded world and gets more support after the acquisition by Amazon in 2017. However, FreeRTOS is a bare operating system.  Everything else such as drivers, file systems, crypto modules, network stacks, middleware, and a bootloader must be added from other sources.

ARM’s Mbed OS has the out-of-the-box integration with ARM’s Pelion Device Management going for it, making it a great choice to learn about IoT device provisioning, connection and management through LwM2M. Provided by ARM, it obviously does not support popular IoT platforms like ESP32 or RISC-V.

Mynewt has everything you could wish for in an operating system for resource constrained IoT devices, but the BSP support is fairly limited.

Zephyr originated from the Virtuoso DSP operating system which initially got rebranded as “Rocket” kernel, following its acquisition by Wind River Systems, but became Zephyr in 2016 when it became a Linux Foundation hosted Collaborative Project. Major sponsors and contributors of this open source collaborative effort include IntelNordic SemiconductorNXPSiFiveSynopsys and TI.

Like many other operating systems, Zephyr provides:

  • Secure bootloader (MCU Boot)
  • Kernel
  • Network stacks
  • File systems (NFFS, LittleFS, NVS)
  • Middleware (including the MCUmgr OTA mechanism and LwM2M client functionality)
  • Device drivers

ZEPHYR LICENSING

Zephyr is mostly licensed under the Apache 2.0 license, but drivers from Nordic and NXP are licensed under the permissible BSD-Clause-3 version, although some of the build tooling is GPLv2.

Example Project

An example Zephyr firmware project can be found on https://github.com/bdevices/ly10-zephyr-fw

This project is a demonstration firmware for our nRF52-based “LY10” demo board, which we ship with our Production Line Tool.

CLONE

Use the following Terminal command to obtain a local copy of this example project.

git clone https://github.com/bcdevices/ly10-zephyr-fw.git

BUILDING

To simplify building the firmware, we’ve setup this project with Docker-based build scripts, avoiding the need to install anything else than Docker itself.

To build:

make docker

The resulting ly10-zephyr-fw-VERSION.hex file can be programmed through the west tool (if you’ve installed the Zephyr tooling locally), or use target-specific Vendor tools (nRF Connect Programmer).

SOURCE CODE

The demo firmware source code is very simple, contained in the src/app folder:

BOARD DEFINITIONS

Building for one of the target boards directly supported by zephyr is a matter of specifying the correct board name.

Since the LY10 is a custom board that is not defined in the upstream Zephyr project, we’re defining a custom board in boards/arm/ly10demo:

References

About the Author

Ivo Clarysse is CTO at Blue Clover Devices. At heart, he is a software engineer with extensive experience working on embedded systems software and linux device drivers.

Social Change in Open Source Software

Amy Occhialino is the Chair of the Zephyr Project Governing Board and Director of Software Engineering at Intel. She has more than 20 years experience in technology and has recently shared insight into the social change in open source software at several conferences. She recently gave the keynote at The Consortium for Computing Sciences in Colleges and the Society of Women Engineers. In this blog, Amy shares some of that insight from her talks. 

You may know Intel only as a hardware company, and in many ways this is true.  Intel’s core business is semiconductor design and manufacturing. What may be news to you is that Intel has spent close to two decades working in the open source software community, collaborating on projects that enhance Intel Architecture and advocating for the beauty, elegance, and possibilities that exist within open source software development. 

Intel software engineers are key contributors to the Linux kernel, are Linux kernel maintainers, and hold many software standards and leadership positions within open source projects and communities.  Open source software development is an enormous commitment and investment at Intel. In fact, we went from sponsoring 12 open source projects to 200 spanning cloud, edge, and device growth over the last decade. The Zephyr Project is a great example of this. 

Leading the future will require a wide range of perspectives, backgrounds, and ideas to effectively solve the world’s toughest challenges. We, as a technology community, are bound to fail if we do not demonstrate a commitment and passion to increasing and achieving full representative diversity within the open source software industry.  

Our success will be threatened in three ways:

  • Market Failure:  Without diversity-fueled creativity, innovation is stifled.  The same perspective and thoughts are generated and reinforced, preventing new solutions from emerging.
  • Customer Failure:  We will lose customers because we don’t listen to them, engage with them, understand them, and learn from them in a full perspective of ways.
  • Talent Failure:  We will lose top talent because individuals with diverse backgrounds feel out of place in our culture and environment.

The Zephyr Project is committed to achieving an inclusive and diverse open source environment. We encourage any and all developers interested in the RTOS landscape to join the conversation and share your interests and talents with the community. Change doesn’t happen all at once, it’s incremental, one person doing one thing every day. 

For me, I personally increase diversity in my own teams through my hiring practices, I have spent a decade creating support systems through my leadership of women’s groups, and I actively advocate for social change within Intel and my tech community.  I am proud that Zephyr is part of this as an open source project with a high amount of diversity 

Open source software gives us the potential conditions, but we must actively engage with it, and monitor it, for it to be what we want it to be.

If you’re new to Zephyr RTOS, please see our Getting Started Guide and check out our Contributor Guide. Or, you can join the conversation and ask questions on our Slack channel or Mailing List and follow #zephyrproject on IRC.

Society of Women Engineers – NOVEMBER 13, 2019

On Wednesday, November 13, the Society of Women Engineers will host its November meeting at 5:45 pm at the Shiley School of Engineering, located at 5000 N. Willamette Blvd in Portland. Zephyr Project Governing Board Chair Amy Occhialino, Director of Software Engineering at Intel, will give a keynote about “Social Change in Open Source Software.”

To learn more about this event, visit the Shiley website here.

Zephyr RTOS Meetup in Helsinki, Finland

NOVEMBER 12, 2019 | 6:00 PM – 8:00 PM

The Internet of Things Helsinki is hosting a Zephyr RTOS Meetup on Tuesday, November 12 from 6-8 pm at Intel’s office, located at  Westendgatan 7 (meeting room Halti). Several Zephyr Project Community Members will be on-site to provide an overview of the RTOS, insight into Bluetooth Mesh and share demos. The sample agenda is below:

Andrei Laperie will present an overview titled, “Zephyr OS: an introduction for engineers.” He’ll share a brief look at the project’s history continued with the walk though Zephyr’s key architectural modules and use cases.

Johan Hedberg will present a session about “Using Bluetooth for IOT: Bluetooth Mesh and other modern standards in Zephyr stack.” The BLE stack in Zepyhr is a de-facto SIG reference for embedded development; we will look at currently supported standards and the practicalities on using them.

Demos will be on-site that demonstrate Bluetooth, USB and networking technologies supported in Zephyr on the hardware and in emulator.

This event is free to attend but we encourage you to register. To RSVP for the event, visit the website: https://www.meetup.com/Internet-of-Things-Helsinki/events/265369043/.

Zephyr Mini-Summit: Zephyr LTS 1.14 – An Open Source RTOS you can get on board with

OCTOBER 31, 2019 | 8:00 AM – 1:00 PM

This is a half-day, single-track event designed to introduce you to the leading Open Source RTOS built with safety and security in mind.  Attendees will learn why Zephyr is gaining the attention of  developers, with its support for BLE, OpenThread, LTE-M/NB-IoT cellular communications, and more. Learn about the latest security enhancements with Zephyr OS LTS, as well as the progress toward Functional Safety Certification.
In the second half of the session, attendees will receive hands-on experience with boards which have been graciously donated by Zephyr Platinum Member Nordic. Stay tuned for specifics.

How to Register:
Please add the Zephyr Mini-Summit to your current Open Source Summit Registration, for an additional fee of $50.

Embedded Linux Conference Europe OCTOBER 28, 2019 – OCTOBER 30, 2019

The Zephyr Project will be on-site at this year’s Embedded Linux Conference in Lyon, France on October 28-31. Join us at one of the 13 presentations given by Zephyr community leaders like BayLibre, Bluetooth SIG, Intel, the Linux Foundation, Nordic Semiconductor, PHYTEC Messtechnik GmbH, Synopsys and more!

Monday, October 28:

11:30 am – 12:05 pm – Bluetooth Mesh and Zephyr – Martin Woolley, Bluetooth SIG

This session will explain the fundamental technical concepts of Bluetooth mesh, including models, messages, publish/subscribe, node composition and security keys and will explore what’s involved in implementing firmware that uses Bluetooth mesh on the Zephyr RTOS platform. Add it to your schedule here.

12:20 – 12:55 pm – Multi-core Application Development with Zephyr RTOS – Alexey Brodkin, Synopsys

This presentation will examine multi-core application options and considerations using the Zephyr. We’ll start from exploration of use-cases where multiple CPU cores might be beneficial for deeply embedded system including both asymmetric & symmetric multiprocessing (AMP & SMP). Then we’ll discuss current state of multi-core support in Zephyr: what is already implemented and what’s still missing. And in the end we will highlight challenges associated with designing high performance software applications for multi-core hardware using samples on boards currently supported in upstream Zephyr project. Add it to your schedule here.

4:20 – 4:55 pm – Panel Discussion – Building Safe Systems with Open Source Software – Lukas Bulwahn, BMW AG; Kate Stewart, the Linux Foundation; Nicole Pappler, TUV SUD Product Service GmbH; Nicholas McGuire, OSADL; Paul Sherwood, CodeThink & Trustable

This panel will discuss the challenges on technology, software engineering, safety methods, organization and ecosystem when building safe systems with open-source software. Add it to your schedule here.

4:20 – 4:55 pm – Precision Timeouts in Zephyr: Past, Present and Future – Piotr Ziecik, Nordic Semiconductor

In this session, Piotr Zięcik will give insight into Zephyr timing infrastructure and cover recent activities aimed to improve real-time capabilities of this operating system, as well as compare the achieved performance with real-world requirements. Piotr Zięcik will also present plans for long-term evolution of Zephyr timing infrastructure. Add it to your schedule here.

6:00 – 6:35 pm – BoF: Multibuild for Zephyr RTOS – Marti Bolivar, Nordic Semiconductor

The Zephyr RTOS build system currently supports generating a single application image. This build is isolated from other related images, such as bootloaders, secure vs. nonsecure Arm TrustZone images, multi-core applications communicating via IPC mechanisms, etc. Different Zephyr downstream distributions have solved this problem in different ways, but there’s so far no consensus on how to solve this problem upstream. This BoF is meant to keep the conversation going among anyone who is interested in this topic. Add this to your schedule here.

Tuesday, October 29: 

2:25 – 3 pm – Zephyr OS Memory Protection – Andrew Boie, Intel 

In this presentation we describe the MPU-based memory protection features we have introduced in the Zephyr RTOS, showing novel techniques for working around the limitations of MPU hardware, implementing security domains in a physical memory map (no virtual memory), and maintaining API compatibility with platforms that do not have an MPU. We will show the permission management system to control access to kernel objects and device driver instances, and how both static and dynamically allocated kernel objects are managed. There will be some discussion on how global objects are routed to application memory domains and how we automatically manage size/alignment constraints of common MPU hardware. We will show how simple it is to define system calls. We have implemented futex-like capabilities to implement IPC mechanisms with no system calls required for uncontended locks. We will conclude with ongoing areas of development. Add it to your schedule here.

2:25 – 3 pm – Open Source and Functional Safety: Two Approaches to Bridge the Culture Clash – Kate Stewart, the Linux Foundation

This talk will summarize the current state of Zephyr and the project’s plans for going after Functional Safety certifications, while still handling any potential security issues. This will be contrasted with the ELISA project and how the team on ELISA is working towards new processes and tools to help Linux be confidently used in functional safety applications. Add it to your schedule here.

3:15 – 3:50 pm – A Dive into Zephyr Device Driver Model – Tomasz Bursztyka, Intel

Besides the kernel, the second most important part of an OS is how all peripherals are exposed to the user, finally enabling the OS to access the world outside of the CPU it is running on. Zephyr solves this by proposing a very simple yet flexible device driver model, deeply integrated with the device tree (DTS), making porting hardware to it efficient and easy. Through real use cases and from a developer perspective, this model will be explained as well as the life cycle of a device driver, whether it is native or ported from an existing HAL. Add it to your schedule here.

4:20 – 4:55 pm – Writing your own Gadget with Zephyr OS – Andrei Emeltchenko, Intel

In this talk, the author describes possible ways of connecting IOT devices using embedded boards running Zephyr OS, connected to host PC via USB. In particular, the following sample cases are explained: Export custom radios from Zephyr to Linux host (IEEE 802.15.4 and Bluetooth) so that Zephyr board behaves as a radio adapter for Linux. Author outlines the possibility of making IP bridge out the Zephyr-based SOC board. The device in this scenario behaves like USB Ethernet controller using ECM or RNDIS protocols. Part of the presentation is dedicated to OS drivers for the Zephyr-based boards. Add it to your schedule here.

5:10 – 5:45 pm – Device Tree: Past, Present and Future – Neil Armstrong, BayLibre

Neil will present you the history of Device Tree from its origins, how it has been used for ARM and now RISC-V from the PowerPC codebase, all the very different current usage and an overview of its future application and evolutions. Add it to your schedule here.

5:10 – 5:45 pm – Building a Debug Probe with the Zephyr RTOS – Johann Fischer, PHYTEC Messtechnik GmbH

​The talk is about whether it would be possible (and how) to build a debug probe on top of the Zephyr RTOS. Zephyr already has a reasonably stable USB device stack with CDC-ACM and MSD support. The author will give a overview about the structure of debug probe software like DAPLInk, and the USB device stack in Zephyr. Furthermore, the author will introduce the implementation of the components and their interaction in Zephyr. Add it to your schedule here.

Wednesday, October 30: 

11:30 am – 12:05 pm – The Journey of Leading Open Source Engineering Team in China – Jocelyn Li, Intel

In this talk, Jocelyn will talk about the various challenges and share how she led the open source engineering team by changing her mindset, embracing the open source development model and role-modeling the way.
– Reluctant to discuss via mailing list
– Embracing community
– Submitting patches with good quality change log and code
– Discussion and debating
– Upstream vs Product

Add it to your schedule here.

2:25 – 3 pm – Running Linux on Constrained IoT Device – Rui Silva, Linaro and Tushar Khandelwal, Arm

This presentation will talk about the work we have been doing to do memory optimizations in Linux kernel and file systems and uses it to build an IoT device frameworks that run on a small platform with limited ram and XIP flash. Add it to your schedule here.

If you want more Zephyr, stay an extra day and attend the Zephyr Mini-Summit on Thursday, October 31. This half-day, single-track event designed to introduce you Zephyr and offer a hands-on experience with boards donated by Zephyr Project member Nordic Semiconductor. Please add the Zephyr Mini-Summit to your current Open Source Summit Registration.