
I’m excited to announce, on behalf of the community, that Zephyr 4.2 is officially out!
It is packed with contributions from developers—810 in total, a record!—worldwide who have been busy expanding hardware support and adding new capabilities. As I will be diving into some of these in this article, you are also encouraged to check out the accompanying video for some nice demos that provide additional context and showcase these new features in action.
As you read through the article, clicking on the ▶️ symbol will take you to the section of the video that shows the feature in action.
The merge window for Zephyr 4.3 will open in just a few days, and the bets are on as to whether we will see even more people contributing to it!
▶️ USB Video Class
USB is a very rich standard and support for it in Zephyr, especially on the device-side, is really strong. It just got even stronger, with USB Video Class now being supported.
An application that comes to mind, and which can easily be tested thanks to the new dedicated code sample, is to turn almost any Zephyr device with USB device support and a video controller/sensor, into a USB “webcam”. However, even more interesting are applications that will leverage other Zephyr features, for example its built-in support for hundreds of sensors, or integrations with Edge AI frameworks such as LiteRT (TensorFlow Lite) or emlearn to effectively build smart cameras, where the video feed is augmented with additional information that is then readily available to the host computer without requiring any specific driver or client application.
The addition of UVC support is also a great opportunity to mention the latest episode of our Zephyr Tech Talks where we discussed real-time image processing on MCUs using libmpix, which happens to work really well when combined with the UVC driver! Make sure to check it out if it is an area that interests you.
▶️ Initial Support for Renesas RX
Every Zephyr release brings support for many new SoCs and boards (we added support for nearly 100 new boards in this release cycle alone), but it’s not every day that a completely new CPU architecture gets added!
With the addition of Renesas RX support, Zephyr is now available on this family of high-performance, low-power microcontrollers that are popular in industrial and automotive applications.
▶️ Twister Power Harness
Power consumption is obviously a big concern when it comes to embedded devices. Many of them are battery-powered and having to replace batteries too often can be impractical, costly, and sometimes outright impossible (think vehicle sensors buried in concrete in parking lots).
Fine tuning an application so that it gets to an acceptable power consumption level takes time (but, luckily, is something where Zephyr helps a lot by providing power management features out-of-the-box), and you usually want to make sure that, as your application evolve, you don’t inadvertently introduce changes that increase power consumption.
To help with this, we have added a new Twister harness that allows you to describe the expected power consumption of your application so that when Twister builds and runs your application on the target device, it can use a power meter to sample and compare actual consumption against expected values.
In terms of power meters, only STM32CubeMonitor is currently supported, but I am really hoping to see support added for some of the other popular solutions out there (Nordic PPK, Joulescope, etc.).
▶️ MQTT 5.0
Many applications built on Zephyr make use of its extensive networking capabilities. It supports many of the protocols typically used in IoT (Internet of Things) applications, at the forefront of which is MQTT. As of Zephyr 4.2, the latest version of the MQTT specification, MQTT 5.0, is now supported!
MQTT has been around for decades—long before “IoT” or “M2M” (Machine-to-Machine) were even a thing. It has traditionally been a very simple and lightweight protocol and yet, this relative simplicity also came with limitations which the 5.0 version is now addressing.
Using MQTT 5.0 in Zephyr is as simple as setting CONFIG_MQTT_VERSION_5_0=y
, at which point the MQTT library will default to MQTT 5.0 when establishing connection to an MQTT server.
Nearly 100 new boards supported
With 96 boards added since Zephyr 4.1, we’re just a few boards short of hitting the 100 mark. Still, the number is pretty impressive, and you should check out the full list of added boards as it is actually a nice way to get the pulse of the industry in terms of what vendors are particularly active, what community/hobbyists boards are getting more traction these days, etc.
One thing that was particularly nice to see was the addition of many new RISC-V boards based on WCH and Bouffalo Lab SoCs.
And more…
There is so much more that would be worth highlighting, so please make sure to check out the full release notes for a more complete list of changes. Meanwhile, I couldn’t resist and call out a few more noteworthy items:
▶️ Zbus graduates to stable API
Zbus was introduced with Zephyr 3.3 and since then it’s been adopted by many users, and its API has come to a point where it’s effectively very stable, so it only made sense that it would officially be declared stable as of Zephyr 4.2.
Rodrigo Peixoto, zbus maintainer and recently appointed Zephyr TSC (Technical Steering Committee) member, is running a survey that I really encourage everyone to take to help drive the future of zbus.
Results will be presented and discussed at the Zephyr Developer Summit in Amsterdam next month
▶️ Improved Devicetree developer experience
We know Devicetree can be tricky at times when you’re first getting started with Zephyr and, let’s face it, it can also cause headaches to the most seasoned Zephyr developers too! Therefore, we’re incrementally improving some of the tooling around it, specifically aiming at making it easier to troubleshoot configuration issues.
The zephyr.dts
file that one can find in their application’s build folder and that corresponds to the “final” Devicetree once all overlays (board, shield, snippets, application, …) have been applied, now includes very useful comments indicating where each given node or property was last added/modified.
/ { #address-cells = < 0x1 >; /* in zephyr/dts/common/skeleton.dtsi:10 */ #size-cells = < 0x1 >; /* in zephyr/dts/common/skeleton.dtsi:11 */ model = "Wio Terminal"; /* in zephyr/boards/seeed/wio_terminal/wio_terminal.dts:15 */ compatible = "seeed,wio-terminal"; /* in zephyr/boards/seeed/wio_terminal/wio_terminal.dts:16 */ /* node '/chosen' defined in zephyr/dts/common/skeleton.dtsi:12 */ chosen { zephyr,flash-controller = &nvmctrl; /* in zephyr/dts/arm/atmel/samd5x.dtsi:52 */ zephyr,entropy = &trng; /* in zephyr/dts/arm/atmel/samd5x.dtsi:51 */ zephyr,sram = &sram0; /* in zephyr/boards/seeed/wio_terminal/wio_terminal.dts:19 */ zephyr,flash = &flash0; /* in zephyr/boards/seeed/wio_terminal/wio_terminal.dts:20 */ zephyr,code-partition = &code_partition; /* in zephyr/boards/seeed/wio_terminal/wio_terminal.dts:21 */ zephyr,display = &ili9341; /* in zephyr/boards/seeed/wio_terminal/wio_terminal.dts:22 */ zephyr,console = &board_cdc_acm_uart; /* in zephyr/boards/common/usb/cdc_acm_serial.dtsi:9 */ zephyr,shell-uart = &board_cdc_acm_uart; /* in zephyr/boards/common/usb/cdc_acm_serial.dtsi:10 */ zephyr,uart-mcumgr = &board_cdc_acm_uart; /* in zephyr/boards/common/usb/cdc_acm_serial.dtsi:11 */ zephyr,bt-mon-uart = &board_cdc_acm_uart; /* in zephyr/boards/common/usb/cdc_acm_serial.dtsi:12 */ zephyr,bt-c2h-uart = &board_cdc_acm_uart; /* in zephyr/boards/common/usb/cdc_acm_serial.dtsi:13 */ }; ...
▶️ Board catalog now list shields
Our board catalog now also lists the available shields (156, and counting!) and just like boards you can also search using advanced criteria like vendor name or supported hardware features.
▶️ Make sure to update to Zephyr SDK 0.17.2
A few weeks back, a new version of the Zephyr SDK was released which you will definitely want to update to if you’re interested in trying out Renesas RX, but that is generally a good idea to use so that you’re pulling recent versions of GCC, qemu, etc. As a reminder, running west sdk install
in your workspace is your best bet to seamlessly download and unpack the latest SDK!