Skip to main content
BlogEventsIndustry ConferenceZephyr Developer Summit

Zephyr Development Made Easy: Exploring FPGA, Codespaces, and Yocto

By July 30, 2024No Comments

The Embedded Open Source Summit took place from April 16-18 in Seattle, Washington, alongside the Open Source Summit North America. The Zephyr Developer Summit was part of the EOSS, aimed at developers using or considering Zephyr in embedded products. This year, we concentrated on supporting topics relevant to Zephyr users, upstream contributors, and maintainers.

More than 860 individuals from 721 organizations across 46 countries registered for the EOSS conference. The Zephyr track featured over 50 technical sessions, both in-person and on-demand, focusing on users, upstream developers, and maintainers.

Videos from the Zephyr Developer Summit are available on the Zephyr Project YouTube channel. We will highlight a few videos each week in a blog for easy access.

Today we are featuring:

Automated, Simulation-Based Flow for Low-Cost FPGA-Accelerated Devices with Zephyr on BeagleV-Fire – Piotr Zierhoffer, Antmicro

Piotr Zierhoffer from Antmicro presented a talk at the Zephyr Developer Summit focusing on the automated simulation-based workflow for low-cost FPGA-accelerated devices using Zephyr on the BeagleV-Fire platform. Highlighting the capabilities of the PolarFire SoC, which combines 4+1 RISC-V cores with an integrated FPGA fabric, Piotr discussed its application in advanced fields like space, automotive, and industrial sectors.

The BeagleV-Fire, a low-cost platform from BeagleBoard.org, enables developers to integrate custom FPGA hardware blocks into real-time systems built with Zephyr, enhancing functionalities such as motor control, video, and AI processing. Piotr demonstrated the recently contributed Zephyr port for BeagleV-Fire and first-class support in the Renode simulator, developed in collaboration with Microchip and Antmicro. This setup allows for the rapid development of flexible, low-power, high-performance systems with FPGA acceleration.

The talk showcased how VS Code and an open source visual design tool called VSD can be utilized to build and configure custom peripherals in FPGA logic, connect them to Zephyr, generate the necessary firmware, and run the entire setup on both real hardware and in Renode, with peripherals co-simulated directly from Verilog/VHDL. Additionally, an automated live visualization of the simulated platform was presented, illustrating the seamless integration of FPGA and Zephyr in a cost-effective and efficient manner.

Conor Paxton of Microchip co-authored this session, highlighting the joint efforts between organizations to promote open-source solutions in FPGA and RISC-V technologies.

Build Before Installing: Zephyr Dev Environment Using Codespaces – Mike Szczys, Golioth

Managing tool chains and build environments has long been a challenge in embedded development. Despite improvements, getting a local install ready to build Zephyr code can still be daunting for new users. In this talk, Mike Szczys from Golioth presented a solution using GitHub Codespaces to streamline this process. Codespaces, a VM-based approach run by GitHub, allows users to open VS Code in a browser and start building Zephyr samples immediately. This setup uses a Dev container and is configured to launch with a single click, offering a nearly complete development environment.

Mike Szczys demonstrated how Golioth moved their Zephyr training to Codespaces using just 23 lines of code. He showed the setup process, how the repository is organized, and how Codespaces builds a container in the cloud, enabling a seamless development experience. The talk highlighted the strengths of this approach, including pre-configured environments and easy access to all necessary tools, while also addressing the limitations, such as the lack of USB connectivity for flashing hardware.

The presentation explored the use of development containers, an open standard, and how this setup can be run locally with Docker. It also covered the customization of VS Code to enhance the user experience during training sessions. The ultimate goal was to make it easier for users to start building and experimenting with Zephyr, thereby reducing the initial friction and encouraging more people to try it out. Mike also discussed potential future uses of this approach, such as providing snapshots of specific build environments for troubleshooting and validation purposes.

Building Zephyr using Yocto – Naveen Kumar Saini & Anuj Mittal, Intel

Zephyr OS, based on a small footprint kernel, is designed for use on resource-constrained embedded systems. It supports multiple architectures and provides features like preemptive scheduling, multi-threading, interrupt services, communication protocols, and more.

The Yocto Project delivers tools that create customized operating system images for embedded Linux systems. The Yocto Project build system can serve as an alternative method to build Zephyr applications.

In this talk, Naveen Kumar Saini and Anuj Mittal from Intel presented the steps to configure and build Zephyr images using the Yocto Project for x86 and ARM architectures. They introduced the meta-zephyr Yocto layer, which was specifically created for this purpose. The meta-zephyr layer offers:

  • Machine configurations for a list of ARM and x86 boards
  • Interactive Kconfig interface support using menuconfig
  • Flashing support for certain ARM boards
  • Zephyr SDK (Software Development Kit) toolchain support
  • QEMU support for development

The talk included a detailed walkthrough of configuring and building Zephyr applications for QEMU, demonstrating how to set up layers, perform build configurations, and enable specific kernel configurations using menuconfig. They provided insights on running the built applications on QEMU.

Additionally, they discussed a real-world use case where Zephyr was built as a virtual machine for the ACRN hypervisor, leveraging the multi-configuration capabilities of the Yocto Project. This use case demonstrated building multiple images for different boards and architectures using a single build environment, emphasizing the flexibility and efficiency provided by the Yocto Project.

Naveen and Anuj concluded by encouraging contributions to the meta-zephyr layer and discussing the potential benefits of using Yocto over traditional build systems, such as utilizing the latest build tools and managing complex build environments more efficiently.

 

Watch the rest of the Zephyr Developer Summit videos here. The schedule and links to the PPT presentations can be found here. Photos from the EOSS can be found here.

For more information about the 2024 event, stay tuned by subscribing to the Zephyr quarterly newsletter or connect with us on @ZephyrIoT, Zephyr Project LinkedIn or the Zephyr Discord Channel to talk with community and TSC members.