More than 380 people registered for the 2nd Annual Zephyr Developer Summit, which took place on June 8-9 in-person in Mountain View, CA and virtually for attendees around the world, to learn more about the fastest growing RTOS. We hosted a “Zephyr Intro Day” on June 7 and had 4 tracks, 2 mini-conferences, 2 tutorials, 54 sessions and 58 speakers who presented engaging technical content, best practices, use cases and more. We’ll be adding event videos each week to the Zephyr Youtube Channel.
Today, we’re featuring all of the presentations that showcase user space considerations with Zephyr RTOS including, “Supporting Native_Posix on MacOS,” “Combining Zephyr & C++20 to Build Safe, Low-footprint, Event-based Applications,” “Using Zephyr with Non-C Languages,” “Linkage in the Third Millenium. Ideas, Innovations, Experiments and Prototypes for Flexible RTOS Builds on Modern Devices,” and “Leveraging Userspace to Safety Run Untrusted Lua.” Watch the videos below or click on the session title for links to the presentations.
“Supporting Native_Posix on MacOS” – Christopher Friedt, Software Engineer at Meta/ASIC FW
Although Zephyr’s SDK now has support for macOS, there are some areas where the developer experience is not quite the same as on Linux. One of those areas is support for the native_posix build target. The native_posix build target allows us to run Zephyr as a native userspace process with a minimal amount of abstraction. It exercises the same code paths as on real target devices. It is used extensively for Zephyr’s comprehensive integration and unit test suites as well as for the BLE simulator. Thus far, native_posix has mainly worked on Linux due to predominant use of ELF for all supported targets. However, there were some .. “speedbumps” when trying to add support for macOS which uses the Mach-O binary file format. In this talk, we detail what it takes to run Zephyr’s native_posix target on macOS, challenges encountered along the way, as well as the remaining integration efforts.
“Combining Zephyr & C++20 to Build Safe, Low-footprint, Event-based Applications“- Ioannis Papamanoglou, Lead Embedded Developer IoT at Zonneplan
Most embedded applications rely on the main loop design pattern to provide determinism and safety. Modern tools like Zephyr and C++20 make it possible to deviate from that approach to implement event-based applications which benefit from better modularity, scalability and readability. The main reason event-based applications have not found their way into embedded systems yet, is their dependency on heap allocations, lots of indeterministic run-time and other non-type-safe code. This talk will demonstrate how using C++20s powerful metaprogramming tools in combination with Zephyrs build system to describe event relationships during compile-time and using Zephyrs RTOS capabilities to dispatch event handling implicitly into the fitting execution contexts (irq, work queues, threads, …) makes building an event-based application framework that is suited for embedded systems possible.
“Using Zephyr with Non-C Languages” – David Brown, Senior Engineer at Linaro
There are several emerging programming languages that are attempting to improve the development of embedded systems. Much of their focus is on standalone systems, which unfortunately means implementing much of HAL and device driver support. What if, instead, we bring these languages to Zephyr? This presentation will discuss two of these languages, Rust, and Zig, giving a brief overview of each language, and cover what is necessary to build a Zephyr application, where a majority of the newly written code is written in Rust or Zig. There will be a summary of the difficulties encountered, including where Zephyr has a perhaps excessive “C” focus, and what might be useful to include in the project going forward. There will also be an emphasis on the security improvements that can be made by using newer languages.
“Linkage in the Third Millenium. Ideas, Innovations, Experiments and Prototypes for Flexible RTOS Builds on Modern Devices” – Andrew Ross, Senior Software Engineer at Intel
Zephyr has pushed the v6 UNIX linker beyond its breaking point. We link C code, but also build-time protocols between source and custom code generators. We use the linker to define relationships between runtime objects, to segregate regions by design intent at the application layer, and its output still routinely needs further postprocessing. Every platform has its own tricks here, many involving significant design impact or technical debt. And upstream toolchains have left embedded targets behind (c.f. LTO). Build time optimization has always been a core part of the Zephyr culture, and almost all of it ends up in the linker at some point. This talk is a presentation of ideas on the subject, a review of history, a collection of requirements, some proposals for a cleaner, more extensible and programmable interface, and with luck an actual prototype.
“Leveraging Userspace to Safety Run Untrusted Lua” – Benjamin Riggs, Founder and CEO, and Louis Goessling, Embedded Systems Engineer at Entropic Engineering
Lua is a widely-used and easily approachable scripting language designed to be embedded into larger code-bases. It is frequently used in video game modding & development, and enables amateur coders to modify the behavior of an existing system. Applying this paradigm to embedded systems creates many opportunities, but also creates a larger surface for software errors to cause irreparable hardware damage. This risk can be mitigated with careful system design using the protections offered by zephyr’s MPU-backed userspace. Compiling and running Lua code in userspace enables end-users to directly customize device behavior with their own software while still guarded by manufacturer-provided safety and security guarantees.
If you have questions or would like to chat with any of our Zephyr speakers, ambassadors or members of the Technical Steering Committee (TSC), please join us on Discord.