On behalf of the Zephyr community, I am very excited to announce that Zephyr 3.5.0 is now generally available.
Before diving into some of the key highlights for this new release, I want to share a quick rundown of the sheer amount of work that, once again, went into the release:
Zephyr is an embedded framework on steroids. Beyond simply a “kernel”, it is a complete suite that allows writing embedded applications that are efficient, portable, and secure. As such, it is suitable for a wide variety of applications, many many of which may require some form of connectivity.
Zephyr 3.5 introduces numerous enhancements to its various connectivity options to keep them aligned with latest developments in the various standards (Wi-Fi, Bluetooth, etc.), secure, and easier to maintain going forward. This will greatly simplify the lives of connected product developers.
What’s more, whether you’re looking at building IoT devices or not, several significant improvements were made to help build applications that are small, modular, and well tested (and if this sounds like a pretty generic statement to you, it’s because I want you to read further to see what I mean by that!).
To get a live demo of Zephyr 3.5’s new features and hear directly from the maintainers and contributors who helped build them, I invite you to join us next Wednesday, October 25, at 1pm GMT for a special Zephyr Tech Talk episode!
Finally, I would like to remind you that this post is by no means meant to be a comprehensive list of all the changes that went into this release. So, if you are interested in a more complete overview, you are encouraged to check out the full release notes here.
Additionally, we’re introducing a new Migration Guide. It provides an actionable list of things that you may need to do to migrate your application from 3.4 to 3.5 (ex. Kconfig options that have changed, new required properties in bindings, etc.).
New & Noteworthy
Static code analysis made easier with Codechecker integration
No one likes bugs, and static code analysis is a great way to catch them early. Zephyr 3.5 adds a direct integration of CodeChecker—a free and open source tool—that makes it very easy to run advanced static code analysis on your Zephyr application.
Getting a CodeChecker report for your code is literally as simple as passing the
ZEPHYR_SCA_VARIANT=codechecker compilation flag to your build command.
Dynamic modules, finally unlocked
One of the most requested Zephyr features over the years has been to make it possible for an application to dynamically be extended at runtime. The new linkable loadable extensions subsystem is providing an infrastructure for dynamically loading and invoking modules at runtime. It unlocks a wide variety of use cases, like for example the ability to dynamically update a TinyML at runtime.
Picolibc as the new default C standard library
There have always been several options in terms of which C standard library to use when building a Zephyr application.
People interested in having a minimal footprint and/or not requiring any fancy C primitives have the option of linking against the “minimal libc” implementation that ships with Zephyr, while those in need of a full-blown C library (for example to do slightly more advanced math, get access to the full list of format specifiers for formatting strings, etc.) could link against Newlib… at the cost of a slightly increased footprint of course.
Recently, another option that’s bringing the best of both worlds—a small footprint, and a rich feature set—was added in the form of Picolibc. As of Zephyr 3.5, Picolibc is now the default C library. Picolibc offers standard C library APIs and specifically targets small embedded systems.
New native simulator
In order to make it easier to run and test Zephyr applications on Linux computers, a new native simulator has been introduced as an evolution of the “native POSIX” boards.
One of the main benefits is that, unlike native POSIX, the new native simulator is able to link against any C standard library, allowing you to test your application in a more realistic environment.
The native simulator supports pretty much the same peripherals and backends as native POSIX, so it is highly recommended you start using it!
Improved integration with LVGL
Building compelling graphical and efficient user interfaces is as critical to commercial success of smart products as it is a challenging endeavor when targeting constrained systems. There are several libraries out there that help make this task slightly less daunting, and a lot of effort has been put into improving the level of integration between Zephyr and the popular open source LVGL library.
Improvements in Zephyr 3.5 make it easier to build LVGL GUIs (Graphical User Interfaces) that make the most of existing Zephyr infrastructure such as the input subsystem – input devices such as buttons, touch screens, etc. can be easily abstracted out and described using Devicetree – or the Zephyr shell.
It is really nice to see that even the official LVGL documentation now has instructions to help people interested in leveraging Zephyr get started quickly!
Strengthening connectivity options
Zephyr shines for all things connectivity, from Bluetooth, to Wi-Fi, cellular, and more. This new release is bringing several improvements that are helping keep all the connectivity stacks future-proof by improving their performance, security, and maintainability.
One of the most notable changes is the long overdue overhaul of cellular modems support. A new modem subsystem has been introduced. It enhances the modularity of modem drivers, improving their testability and integration with other Zephyr subsystems. In case you missed it, you can learn more about why this is important, and what are some of the future work items planned in this Zephyr Tech Talk episode.
Other improvements in terms of connectivity include, to name just a few:
- LwM2M stack can now run in tickless mode, which can greatly improve power efficiency;
- Scanning for Wi-Fi access points now provides more options (ex. filtering by band) and supports passive mode;
- New ICMP and DHCPv6 clients;
- Several improvements to Bluetooth Mesh, in particular around security with added support for TF-M, and tinycrypt and PSA-based cryptography.
New peripherals supported
Battery charger API
Battery chargers play a critical role in optimizing the lifetime of battery-powered devices (and, frankly, in ensuring safety as well, as improper charging can quickly lead to battery fires…).
A new battery charger subsystem has been introduced to provide a single pane of glass for retrieving information such as battery health, or re-configure properties such as current or voltage limits.
Hardware spinlock API
The new hardware spinlock driver API makes it easier to implement synchronization between heterogeneous processors.
The list of multi-function devices is growing
There is an increasing number of devices that are combining multiple functionalities into a single chip. Power management ICs are one great example, as they can typically act not only as a regulator to one or several power rails, but also as a battery charger / fuel gauge, and sometimes even have a few GPIOs.
Zephyr 3.5 is adding or improving support for several of these multi-function devices, such as the nPM1300 from Nordic Semiconductor, the AXP192 as found in several M5Stack devices, and more.
New boards and sensor drivers
- Support has been added for over 45 new boards, across the entire spectrum of supported architectures. While it is impossible to list them all, it’s worth noting that several popular maker boards, such as the Raspberry Pi 4 Model B, the M5 Stack Core2, and the XIAO ESP32S3 are now available, in addition to many more industrial-grade platforms from major silicon manufacturers.
- New sensor drivers have been added for motion sensors such as Bosch BMI08x, iSentek IST8310, InvenSense ICM42688, and AKM AK09918C, as well as dozens of other sensors for ambient light, dust particles, etc.
- It’s also worth noting the addition of a new API for vertically decoding raw sensor data. This can greatly simplify the decoding of the kind of 3-axis data you would typically obtain from an accelerometer or a gyroscope.
A few hidden gems that you’ll want to add to your toolbox
Before hearing more about this new release from the two release managers that were instrumental in making it happen, I want to leave you with a couple cool tips of things that are now possible in Zephyr 3.5, and that you may want to add under your belt:
- Understanding the initialization sequence of your Zephyr application is now easier thanks to the new “initlevels” build target. You can run
west build -t initlevelsto get a nicely formatted dump of the initialization sequence of all the pieces of your application (device drivers, modules, …)
- It might not seem like much, but I want to call that one out as I’m hoping to see more of this kind of “sandboxing right from the Zephyr documentation” stuff in the future: you can now try Zephyr’s WebUSB sample right from your browser. I’d like to see more examples like this in the future, and who know, maybe getting to the point where one can actually hack with a Zephyr shell right from the browser?
Meet our release managers for Zephyr 3.5
As I mentioned in the introductions, over 500 individuals have directly contributed code to Zephyr 3.5, and hundreds, if not thousands more have contributed in other equally important ways such as by reporting bugs, reviewing code, or helping others.
For each release, a special and heartfelt thank you from the entire community goes to our release manager. They are instrumental in making sure that Zephyr ships on time, with the highest quality possible.
I’ve asked our release managers for Zephyr 3.5, Fabio Baltieri (Google) and Johan Hedberg (Intel) to share in a few words what their highlights were for this release, and here is what they had to say:
”The one thing that impresses me with the Zephyr project is how it keeps growing from release to release. Zephyr 3.5 is no exception, regardless of which metric you look at: the number of contributions, the number of contributors, supported features or supported platforms.
One highlight for me in the release is the transition to finally use Picolibc as the default standard C library, which significantly increases the set of supported features, while still having a small footprint.
Another update I’m excited about is the adoption of the ACPICA library to further enhance Zephyr’s ACPI support. ACPICA helps take advantage of more advanced ACPI features while not having to implement all the complexities of the ACPI specification ourselves.Johan HedbergIntel
”The 3.5 release marks a major milestone with the switch to Picolibc as the default C library. This was a major effort that involved many contributors working towards a common goal.
It's nice to see that as the project grows, major changes and improvements are still possible, and the community responds very well to those.
Another important change is that the LVGL module found a new maintainer, and this release already includes multiple improvements including new samples and a whole new set of input bindings. Proper LVGL integration is extremely valuable for any applications using graphical and touchscreen interfaces, so it's very nice that the module is maintained again!Fabio BaltieriGoogle