The Zephyr Project Welcomes Adafruit Industries to its Open Source Ecosystem

Zephyr RTOS will be on Display at Embedded World in Demos from Antmicro, Foundries.io, Nordic Semiconductor and PHYTEC

NUREMBERG, GERMANY – February 24, 2019 The Zephyr™ Project, an open source project at the Linux Foundation that builds a safe, secure and flexible real-time operating system (RTOS) for the Internet of Things (IoT) in space-constrained devices, kicks off 2020 by welcoming new member Adafruit Industries and displaying new solutions at Embedded World on February 25-27 in Nuremberg, Germany.

Adafruit makes open source hardware, tutorials and code for makers to create DIY electronic products. Adafruit joins member companies including Antmicro, Eclipse Foundation, Foundries.io, Intel, Linaro, Nordic Semiconductor, NXP®, Oticon, SiFive, Synopsys, Texas Instruments and more to create an open hardware and software ecosystem using the Zephyr OS.

“We see amazing increases in computing power on edge microcontrollers, and the new wireless technologies coming out allow connectivity for short and long range networks,” said Limor “Ladyada” Fried, Founder & Engineer at Adafruit. “Managing the complexities and security requirements of IoT requires a powerful RTOS that makes development and deployment easy. Zephyr is the leading RTOS we see for cross-platform development and well-thought-out security needs.”

“Adafruit has been making open source hardware for more than a decade and has been a key driver and influencer in the open source community,” said Kate Stewart, Senior Director of Strategic Projects for The Linux Foundation. “Their expertise will be essential to the expansion of the Zephyr ecosystem and deployment of the functional safety and security for the RTOS. We are excited to welcome them into our community and look forward to collaborating  with them.”

A Growing Community

With the vendor-neutral open source environment, contributors have played an integral role in advancing the Zephyr RTOS. Last year, more than 500 contributors helped launch the 1.14 LTS release, which offers vendors a customizable operating system that supports product longevity, security and interoperability. Since then, the community has hit several additional milestones and now has more than 600 active contributors and support for more than 200 boards. In fact, last month Zephyr had 1390 commits – which equates to almost 2 commits an hour.

The Zephyr Project Technical Steering Committee is currently planning a 2.2 release later this month with new features such as:

  • CAN support to include the CANopen protocol through integration of the third-party open source CANopenNode stack. A new sample application to demonstrate how to use the CANopenNode stack was added for the NXP TWR-KE18F and FRDM-K64F boards.
  • LoRa support was added through integration of the Semtech LoRaWAN endpoint stack and addition of a new SX1276 LoRa modem driver. New sample applications to demonstrate sending and receiving LoRa packets were added for the 96Boards WisTrio board.
  • AArch64 architecture support to support Arm Cortex-A53 platforms. This extends Arm core support in Zephyr from existing Cortex-M and Cortex-R cores to now include the first Cortex-A core.

Embedded World

The Zephyr Project will be on site at Embedded World this week. Several members will be giving presentations that include Zephyr and the RTOS will be featured in products and solutions at member and contributor booths such as Antmicro (4A-621), Foundries.io (5-440), Nordic Semiconductor (4A-310), PHYTEC (1-438) and RISC-V (3A-536). More details about the demos can be found here: https://www.zephyrproject.org/sneak-peek-zephyr-project-at-embedded-world/

Additionally, Zephyr will be featured in several presentations, including one from Kate Stewart. On Wednesday, February 26 from 12:30-1 pm, Stewart will present, “Safety Certification and Open Source – Can They Work Together?” More information about her talk as well as presentations from Bluetooth SIG and Nordic Semiconductor, can be found here: https://www.zephyrproject.org/embedded-world-february-25-2020-february-27-2020/

To learn more about Zephyr RTOS, visit the Zephyr website and blog.

About the Zephyr™ Project

The Zephyr Project is a small, scalable real-time operating system for use on resource-constrained systems supporting multiple architectures. To learn more, please visit www.zephyrproject.org.

About the Linux Foundation

Founded in 2000, the Linux Foundation is supported by more than 1,000 members and is the world’s leading home for collaboration on open source software, open standards, open data, and open hardware. Linux Foundation’s projects are critical to the world’s infrastructure including Linux, Kubernetes, Node.js, and more.  The Linux Foundation’s methodology focuses on leveraging best practices and addressing the needs of contributors, users and solution providers to create sustainable models for open collaboration. For more information, please visit us at linuxfoundation.org.

###

Sneak Peek: Zephyr Project at Embedded World

On February 25-27, more than 32,000 people will be in Nuremburg, Germany for Embedded World 2020. The event offers the global community the opportunity to learn about new developments in all aspects of embedded system technologies. Last year, 1,117 companies from 42 countries, almost 100 more than in the previous year, showcased their solutions to the around 31,000 trade visitors from 84 countries at this leading fair for the embedded community.

The Zephyr Project is back at the show again this year – this time with a booth filled with innovative demos, speaking engagements and products/solutions at several member and community booths including: Antmicro (4A-621), Foundries.io (5-440), Nordic Semiconductor (4A-310), PHYTEC (1-438) and RISC-V (3A-536). Here’s a sneak peek at some of the Zephyr demos at their booths:

Antmicro (4A-621): Antmicro will showcase three live demos featuring the Zephyr Real Time Operating System.

Zynq Video Board: a Zephyr-capable FPGA SoC open camera board

The Zynq Video Board is Antmicro’s open hardware platform for high-speed SoC FPGA video processing. Designed to accommodate the Xilinx Zynq (or other FPGA modules), this fully open source board allows interfacing up to two 2-lane MIPI CSI-2 cameras and offers practical HDMI, Ethernet, and SD card support. The EW 2020 demo will feature camera sensors controlled by Zephyr running on a VexRiscV RISC-V softcore – another example of how Antmicro is using and contributing to open source IP, enabling entire FPGA processing pipelines built on open source.

GEM: a rapid turnaround chiplet-based ASIC with Zephyr

Antmicro’s GEM chiplet-based ASIC series was introduced at the 2019 RISC-V Summit to prove that rapid turnaround chips based on open ISAs are enabling engineers to create custom solutions within a practical, quick-prototyping / quick-tape-out process. The GEM demo will show a real-time analysis of video footage from a camera running a Lattice iCE40 FPGA inside the GEM chip. The chip itself features a RISC-V core in a soft SoC (LiteX) and runs Zephyr RTOS for simple control tasks or re-programming the processing FPGA with different bitstreams.

QuickLogic EOS S3 with Zephyr port
Antmicro has recently added a Zephyr port to QuickLogic’s Quick Feather development board for the EOS S3 and the soon-to-be-released addition to the open source Tomu tiny USB family of devices, nicknamed Qomu – both of which will be showcased at Antmicro’s booth. The EOS S3 is also supported in Antmicro’s Renode open source simulation framework for rapid prototyping, development and testing of multi-node systems, offering a more efficient hardware/software co-design approach to Zephyr developers.

PHYTEC (1-438): PHYTEC will feature advanced technologies in the fields of test & measurement, healthcare, agriculture, fitness, energy, transportation, industrial IoT and security applications. They will also be giving out 50 reelboards. The key demonstrations in the system solutions area will showcase: 

Connect 4 demo (Human vs Machine): The PHYTEC object detection, inference, and real-time robotics demo (aka Connect4 Demo)  is a classic showdown of Machine vs Human. The Machine, in this case, is a robotic arm, a ball return system, a camera, and a PHYTEC phyCORE-AM5729 embedded system that sees the human’s move, plans its own move, places the game piece, and cleans up after near certain victory. 

Low Power Solutions for IoT: 
        a) different display technologies (passive/EPD, OLED, LCD) using Zephyr OS 
        b) reel board with link boards as a rapid prototyping system for Low Power Applications 
        c) presenting a new link board NOTM.2 module with Nordic nRF5340 
        d) presenting a new link board CAN (Communication via CAN-bus between Linux and Zephyr OS) 

Not only will Zephyr be on display in these hands-on demos, but it will also be featured in several presentations. For more details about the Zephyr presentations, click here: https://www.zephyrproject.org/embedded-world-february-25-2020-february-27-2020/

We hope to see you at Embedded World! Tag @ZephyrIoT in your tweets and we’ll retweet your photos and messages!

Linaro Connect Budapest, March 23-27


Linaro Connect Budapest 2020 will take place on March 23-27 at the Corinthia Hotel in Budapest, Hungary. There are several Zephyr sessions planned by Zephyr Project members and community contributors. Please see the schedule below.

On Monday, March 23:

At 2:30-2:55 pm, Vincent Wan, Embedded Software Engineer for Texas Instruments, will present Power Management in Zephyr. He’ll showcase the current state of power management in the Zephyr RTOS, using a TI MCU platform as a case study. It goes over the current features, the steps involved in adding support for a new platform, and on-going development. Add it to your schedule here.

At 3-3:25 pm, Manivannan Sadhasivam, Kernel Engineer for Linaro, will give a talk about LoRa (Long Range) meeting Zephyr. LoRa (Long Range) is a low power wireless technology targeted for IoT applications. LoRa enables long-range transmissions (more than 10 km in rural areas) with low power consumption through the Chirp spread- spectrum modulation technique. There are multiple attempts from the community for adding LoRa support to Zephyr RTOS. This session goes through all of the efforts taken so far, motivation, current status, and future plans of the Zephyr-LoRa work. To add this session to your schedule, click here. To review references for this session – click here: https://www.semtech.com/lora/what-is-lora or https://github.com/zephyrproject-rtos/zephyr/pull/18998.

At 3:30-3:55 pm, Paul Sokolovsky, IoT Engineer at Linaro, will present an update on LAVA testing for baremetal systems. One of important goals of Linaro LITE team is to ensure continuous integration and validation for the projects it works with. This session covers recent work on improving test coverage for Zephyr and OpenAMP projects, using Linaro’s popular LAVA testing platform. Click here to add this to your schedule.

On Tuesday, March 24:

At 10-10:25 am, Maureen Helm, Software Engineer at NXP and Zephyr Project Chair of the Technical Steering Committee, will present Open Source Enabled Edge Processing. In the last five years, we have seen an explosion of open source in the IoT and embedded industry driven by a shift towards edge processing. Projects like Zephyr have grown from incubation to mainstream, addressing a growing need for common software infrastructure in embedded microcontroller applications that operate on the edge. In this talk we will take a look back at the expansion of open source in this industry in recent years and explore some insights into where it will go in the future. Click here to add it to your schedule.

If you’re interesting in Linaro Connect, visit the event website for more information. https://connect.linaro.org/

Zephyr RTOS for Industrial

Last week, the Internet of Things Helsinki hosted another meetup on Thursday, January 23 from 5-8 pm at the Central Library Oodi. Almost 50 folks registered for the event, which focused on Industrial IoT.

Jefim Borissov with Nortal Oy kicked off the meetup and presented IIoT as part of DDD solutions. He shared why and when DDD matters, common challenges of IIoT and how DDD principles can be applied to the IIoT industry.

Then, Andrei Laperie, Zephyr Project TSC member and Engineer Manager for Intel Open Source Technology Center, discussed industrial networking support in Zephyr RTOS. In this talk, he offered a brief introduction of Zephyr as well as Time Sensitive Networking and CAN support in an industrial environment.

If you couldn’t make it to the meetup, below is the presentation Andrei went through. Look it over and let us know if you have feedback or questions on our Slack channel or Mailing List.

Additionally, 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.

Antmicro’s work with Time Sensitive Networking support in the Zephyr RTOS

This blog originally ran on the Antmicro website. For more Zephyr development tips and articles, please visit their blog.

Solving problems that require real-time calculations and precise control typically calls for using an RTOS. While we have been working with a wide variety of RTOSs for various applications (like Contiki-NG for IoT, RTEMS for space applications, eCos for satellite equipment, FreeRTOS in many other fields etc), Antmicro’s RTOS of choice these days has been Zephyr, a Linux-Foundation driven, well-structured, vendor-independent and scalable real-time OS. We’ve ported and adapted Zephyr to many platforms, encouraged its use as a standard on RISC-V, promoted it in less standard contexts like FPGA devices.

So if you have a single device with a real-time requirement, typically it’s not that hard to decide how to approach the problem – just use Zephyr!

The problem starts when there are multiple heterogeneous devices that have to communicate in a standardised and robust way, performing a complex operation involving a network protocol while never leaving the “real-time” world. Scenarios like this are typical in the aerospace, automotive, robotics industries, and increasingly those industries are looking to reuse technologies known from the commercial/consumer market to leverage the massive scale offered by omnipresent, commodity tech.

For your everyday use case, the easiest way to connect multiple devices is of course Ethernet, but plain old Ethernet does not list real-time capabilities in its dictionary – how then can it be used in a real-time use case?

The set of standards that define Time Sensitive Networking is the answer to that problem. Leveraging the physical and logical foundations of Ethernet and extends it to cover real-time use cases by defining different aspects of time sensitive communication: clock synchronization, traffic shaping, scheduling, fault tolerance etc.

TSN seems then like a good fit, and sure enough, open source support for TSN is widely available in Linux. In the RTOS world however, there has previously not existed a proper implementation of TSN, readily available and tested on real hardware platforms, well, not until Zephyr 1.13!

Initial work: towards a TSN implementation in Zephyr

As a member of the Zephyr Project, Antmicro is always excited to add new functionalities to the OS, especially in fields that open it up for adoption in new use cases. Here, we were happy to work with another Zephyr project member, Intel on getting gPTP support added to Zephyr. “gPTP” stands for “generic Precision Time Protocol” and is responsible for clock synchronization. When we joined the project it was already in progress, but far from being finished. We implemented the missing state machines and fixed various bugs in the existing code.

The initial target was making Zephyr’s clocks synchronize with external Grand Masters.

Our focus was getting it to work on Microchip SAM E70 Xplained. At that time, the platform already had a Zephyr port (including the Ethernet driver), but it lacked drivers for the PTP clock.

The TSN support was also tested on the NXP FRDM K64F development platform which also has a Zephyr port and hardware timestamping support.

After initial support was done and merged, we proceeded with configuring Zephyr nodes as Grand Masters, as well as ensuring operational Zephyr-to-Zephyr clock synchronization.

Qav: an important part of TSN

PTP is only a part of Time Sensitive Networking. Another important part of TSN is queue management.

The platform of our choice (SAM E70 Xplained) has multiple hardware queues built into its MAC controller, which allowed us to use the same platform to extend Zephyr’s TSN capabilities.

Antmicro implemented support for credit-based shaper algorithms in Zephyr, which are described in the 802.1Qav standard.

The work in that area required us to design an API to manage the Qav-capable Ethernet queues. Through this API/management interface, we made it possible to set and read various parameters, like idle slope, delta bandwidth, traffic class, etc.

Additionally, some status parameters were implemented. These are now shown in the regular networking shell in Zephyr for the supported network interfaces.

Running a basic Zephyr gPTP sample application

To find out how to run the basic gPTP sample, please refer to Zephyr’s official documentation.

More general info about the gPTP stack implementation can be found in a dedicated chapter.

Testing in Renode Cloud Environment

A network stack plays a critical role in an operating system like Zephyr. It is also constantly under very heavy development by various parties. Our work on the TSN/gPTP support was heavily influenced by all the changes in the networking subsystem. As can be expected in large development campaigns, these completely unrelated things would break our implementation repeatedly.

The reason for that was lack of more sophisticated testing of the setup. Sure, there were multiple unit tests which directly tested our stack implementation, but Time Sensitive Networking can be broken by seemingly minor changes in other parts of the networking stack.

Obviously, network protocol testing is difficult. You can either use synthetic tests that easily get outdated and don’t really reflect real life scenarios or you can create complicated physical network setups connected to a CI system – which is costly, difficult to maintain and creates only a single, static configuration.

A much better, more scalable solution is to use simulation. With Antmicro’s Renode open source simulation framework you can create script-defined complex configurations, allowing you to verify virtually every scenario imaginable.

In Renode’s 1.7 release, Antmicro added support for the SAM E70 platform, along with Ethernet with gPTP capabilities. With these new features we were able to create a CI setup testing upstream Zephyr in a virtual environment.

And thanks to an integration with the Robot Framework, it’s very easy to create new test cases in Renode. That’s why, for Zephyr, we decided to create a suite of tests verifying a range of aspects of a single application.

This lines up perfectly with the introduction of Renode Cloud Environment – a new CI system introduced by Antmicro, that you’ll be able to read about more on our blog soon. Here is a sneak peek of the TSN testing setup running in RCE.

First, Renode verifies if the board sends a PTP packet, which means that the PTP stack is started properly. Next, we analyze its reception and the proper reaction from the recipient’s OS. We analyze whether the compile-time configuration of the PTP stack is properly reflected in its runtime, and the highest level properties: whether the correct Grand Master node has been selected and whether the slave nodes are properly synchronizing their clocks.

The whole testing setup can be easily recreated with upstream Renode and Zephyr. For instructions, please refer to the TSN testing tutorial.

Building a TSN system?

If you’d like to use TSN is your system, and feel that an RTOS like Zephyr is a good fit for your needs, be sure to reach out to us at contact@antmicro.com – we’d be happy to help you apply TSN on existing and new hardware, and perhaps in simulation, for real-world use cases!