Categories
IoT Zephyr

Zephyr Weekly Update – Video Killed the Radio Star

Greetings, folks! Yeah, it’s been a few weeks… again! I blame the month of May in France that was filled with bridge days. Luckily, this means even more cool news for you to chew on!

Also, we have two upcoming Zephyr Tech Talks after a few quiet weeks, make sure to RSVP to the events so that you don’t miss the opportunity to ask your questions live (and please help spread the word by relaying to your social network, if you feel like it!).

Behind the Scenes of a Zephyr-powered PCIe AI Accelerator // Zephyr Tech Talk #024
Devicetree Editing Superpowers with LSP // Zephy Tech Talk #025

Introducing support for Renesas RX

The Renesas RX family is a line of 32-bit microcontrollers from Renesas Electronics which is positioned as an alternative to Arm Cortex-M.

I personally have no first-hand experience with this architecture, but it seems to be pretty competitive with regards to pure performance, as well as power efficiency. Renesas RX MCUs are a pretty popular choice in applications such as industrial automation, motor control, and healthcare.

It’s not often that Zephyr adds support for a new processor architecture, so let’s celebrate! Also worth noting that the Zephyr SDK 0.17.1, which was just released, provides RX toolchains which you can use to easily build your first apps for the QEMU board or the Renesas Starter Kit for RX130.

Video updates

Zephyr has been shipping with video support for a long time, but over the last year or so, this area has regained interest from various parties and has been incredibly active.

  • A new Video Control Framework (PR #82158) is available, providing a standardized way to manage video device parameters.
  • A Video Shell (PR #88566) was added, offering command-line utilities for interacting with video devices.
  • Added support for many more Bayer, RGB, and YUV pixel formats (PR #88817).
  • Common CCI (Camera Control Interface) utilities (PR #87935).

Simplifying downstream patch management with west patch

The west patch command is not new, but it’s only recently that documentation for it was added, so I thought it was worth mentioning.

This command allows you to organize and apply patches to Zephyr or Zephyr modules in a controlled manner, by means of a patches.yml file that stores metadata about the various patches. It allows, for example, to indicate whether a given patch corresponds to an open pull request.

patches:
  - path: zephyr/my-zephyr-change.patch
    sha256sum: c676cd376a4d19dc95ac4e44e179c253853d422b758688a583bb55c3c9137035
    module: zephyr
    author: Obi-Wan Kenobi
    email: [email protected]
    date: 2025-05-04
    upstreamable: false
    comments: |
      An application-specific change we need for Zephyr.
  - path: bootloader/mcuboot/my-tweak-for-mcuboot.patch
    sha256sum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    module: mcuboot
    author: Darth Sidious
    email: [email protected]
    date: 2025-05-04
    merge-pr: https://github.com/zephyrproject-rtos/zephyr/pull/<pr-number>
    issue: https://github.com/zephyrproject-rtos/zephyr/issues/<issue-number>
    merge-status: true
    merge-commit: 1234567890abcdef1234567890abcdef12345678
    merge-date: 2025-05-06
    apply-command: git apply
    comments: |
      A change to mcuboot that has been merged already. We can remove this
      patch when we are ready to upgrade to the next Zephyr release.

New boards and SoCs

Some of the other boards and SoCs that caught my attention. As a reminder, there’s a new board being added to Zephyr almost every day, so the list below is not exhaustive!

Drivers

  • New sensor drivers:
    • PAJ7620 gesture sensor (PR #85351),
    • PZEM004T AC energy monitor (PR#89123),
    • WSEN-ITDS accelerometer (PR#86213),
    • RM3100 magnetometer (PR#89058).
  • Numerous new display controller drivers were introduced, including SH1122 (PR #87431), SSD1320 (PR #87169), SSD1331 (PR#88178), SSD1351 (PR #89566), and ST75256 (PR #87584), all by @VynDragon 🚀
  • Auxiliary Display: Driver for common 7-segment displays (PR #68501), and LCD1602 (PR #89654).
  • New UART bridge driver (PR #89110) allows to configure bridge between two serial devices, for example a USB CDC-ACM serial port and a hardware UART.
uart-bridge {
         compatible = "zephyr,uart-bridge";
         peers = <&cdc_acm_uart0 &uart1>;
};
  • Support for ADI TMC51xx stepper motor controller (PR #88350)
  • USB Device Controller for Atmel SAM0 (PR #86814).
  • AIROC Wi-Fi driver supports new devices and modules (PR #86137).

Miscellaneous

  • It can sometimes be hard to keep track of all the files (.dts, .dtsi, overlays…) that make up your device’s Devicetree. The zephyr.dts file that’s generated as part of the Zephyr build now includes comments that indicate where each given node or property was last touched. It makes it much easier to find that damn overlay that keeps having the last word 🙂
/ {
	#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 */
	};

...
  • The board catalog now also includes shields as part of the listing. There are currently 150+ shields supported in Zephyr so it’s nice that it will now be easier to search for them more efficiently.
  • CoAP Secure (CoAPS) support has been added, allowing to use DTLS to secure CoAP communication. (PR #65963).
  • LLEXT now has basic support for x86 architecture (PR #90176) as well as ARC MPU (PR#89118).
  • LVGL now supports multiple displays. (PR #86815).
  • Support for Altera NIOS-II architecture has been dropped. (PR #89762)
  • Added XSI_SINGLE_PROCESS and POSIX_CLOCK_SELECTION POSIX option groups (PR #89068).
  • Optimizations to the ZMS backend for Settings (PR #87792).
  • Added runtime Zbus observers pool (PR #88834) for dynamic observer registration.
  • west now offers basic PowerShell auto-completion. (PR #88358)

A big thank you to the 73 (😬) individuals who had their first pull request accepted since my last post, 💙 🙌: @herculanodavi, @ZhaoQiang-b45475, @abhinavnxp, @batkay, @fiveohhh, @gudipudiramanakumar, @mefromac, @segerlund, @alexapostolu, @dsseng, @sayooj-atmosic, @edt-alex, @alrodlim, @Ole2mail, @cfunes-pragma, @cdrask, @wjklimek1, @squiniou, @Kronosblaster, @morishitaandre, @dependabot[bot], @PaulSchaetzle, @zbas, @sandro97git, @tobiwan88, @jsbatch, @gcopoix, @TomasBarakNXP, @mikolaj-klikowicz, @AnElderlyFox, @cbrake, @shiftee, @yolaval, @FKainka, @benson0715, @ct-lt, @Brandon-Hurst, @hdou, @jeremydick, @bastienjauny, @iwasz, @duerrfk, @ebmmy, @araneusdiadema, @srishtik2310, @jbr7rr, @mihnen, @muahmed-silabs, @leonmariotto, @conweek, @fmoessbauer, @AmaanSingh, @Harry-Martin, @ymleung314, @smfebe, @dantti, @meijemac, @thsieh97, @Vijayakannan, @vytvir, @kylebonnici, @tsi-chung, @yongxu-wang15, @anujdeshpande, @Lorl0rd, @minumn, @120MF, @cmm1981, @nordic-mik7, @dylanHsieh4963, @harristomy, @hfruchet-st, and @vignesh-aerlync.

As always, I very much welcome your thoughts and feedback in the comments below!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all previous issues of the Zephyr Weekly Update:

Categories
IoT Zephyr

Zephyr Weekly Update – Packet Filtering, UUIDs & More

Another week, another batch of updates and improvement being made to Zephyr, with over 140 merged pull requests!

Before diving into some of the highlights, I would encourage you to add the video recordings of the recent Zephyr Meetup Grenoble to your watchlist as there were quite a few interesting topics covered!

Network Packet Filtering Updates

It’s no secret that Zephyr’s networking stack is one of its great strengths. This week, some neat improvements to packet filtering have been introduced (PR #88544), including support for VLAN, statistics collection for number of packets affected by filters, a shell module, and more.

A new code sample is available and a great showcase for how you can leverage the Network Packet Filtering API (including the aforementioned improvements) to setup some filtering rules for e.g. implementing firewall functionality, network traffic control, etc.

For example, installing a filtering rule dropping any incoming packet larger than 200 bytes is as simple as:

static NPF_SIZE_MAX(maxsize_200, 200);
static NPF_ETH_TYPE_MATCH(ip_packet, NET_ETH_PTYPE_IP);

static NPF_RULE(small_ip_pkt, NET_OK, ip_packet, maxsize_200);

void install_my_filter(void)
{
    npf_insert_recv_rule(&npf_default_drop);
    npf_insert_recv_rule(&small_ip_pkt);
}

The code sample actually creates multiple VLAN networks, giving an opportunity to showcase rules that only apply to some interfaces. The net filter shell command also conveniently shows you a snapshot of which rules are in place.

uart:~$ net filter
Rule  Type        Verdict  Tests
[ 1]  recv        OK       3    eth vlan type[0x0800],size max[200],iface[2]
[ 2]  recv        OK       3    eth vlan type[0x0800],size min[100],iface[3]
[ 3]  recv        OK       1    iface[1]
[ 4]  recv        OK       2    eth vlan type[0x0806],iface[2]
[ 5]  recv        OK       2    eth vlan type[0x0806],iface[3]
[ 6]  recv        DROP     0

New UUID library

Generating and managing unique identifiers is crucial in many applications, and can be really useful to e.g. tag sensor data samples, generate session identifiers, etc. Thanks to @sorru94‘s work in PR #77884, Zephyr now includes a Universally Unique Identifier (UUID) utility library implemeting RFC 4122.

It provides functions for generating UUIDs (both v4 -random- and v5 -deterministic-), comparing them, and converting UUIDs between string and binary representations.

Check out the dedicated code sample for some code snippets.

New boards and SoCs

  • Renesas RZ/G2LC SMARC EVK: Initial support Renesas RZ/G2LC SoC was added, alongside associated evaluation kit. The RZ/G2LC microprocessor is a dual Cortex®-A55 (1.2GHz) CPU.  (PR #88569).
  • STM32 NUCLEO-WBA65RI: STM32WBA6 SoC is now supported, and the NUCLEO-WBA65RI is a great starting point to experiment with this ultra-low-power board (PR #88407).
  • NXP FRDM-MCXA153: Added support for the NXP MCXA153 MCU and the corresponding FRDM board (PR #85644).
  • BeagleBoard PocketBeagle 2 M4: The Cortex-M4F co-processor of the TI AM6232-based PocketBeagle 2 is now supported. (PR #87997).
  • TF-M on Nordic nRF54L10: Initial support for TF-M now available on the nRF54L10 (PR #88442).

Drivers

  • X-Powers AXP2101 Charger: The charger peripheral within this popular PMIC is now supported. The TTGO T-Watch S3 directly benefits from this since it’s one of the boards supported in Zephyr that uses an AXP2101 PMIC. Note to self: order one ASAP as it is a really cool looking device and now has even more peripherals supported 🙂 (PR #88125).
  • I2C Controller driver added for the WCH CH32V RISC-V family (PR #87922).
  • ITE IT51xxx Watchdog timer driver for ITE EC chips (PR #88470).
  • Silicon Labs SiWx91x WiFi module now supports Background Scanning and Roaming (PR #87037).
  • TI SimpleLink CC23x0 SPI controller support added (PR #84521).
  • RTS5912 Tachometer Sensor driver (PR #86913).
  • STM32N6 USB/UDC: Support added for the USB peripheral and device controller on the STM32N6 series (PR #84976).

Miscellaneous

  • flash_area_copy() API: A new helper function, flash_area_copy(), was added to the flash map API, simplifying the process of copying data between partitions (e.g., for firmware updates) (PR #84604).
  • Xtensa Userspace & Syscall Improvements: Numerous fixes and enhancements were merged for userspace support and system call handling on the Xtensa architecture (PR #88531).
  • LoRaWAN Link Check: Support for the standard LinkCheckReq/LinkCheckAns MAC commands has been added to the LoRaWAN subsystem (PR #87828).
  • Kernel Constructor Handling: Internal handling of C++ constructors (.ctors) and .init_array has been unified and simplified (PR #74700).
  • New CRC Algorithm: Support for the CRC-32K/4.2 algorithm was added (PR #81558).

A big thank you to the 4 individuals who had their first pull request accepted this week, 💙 🙌: @tiennguyenzg, @apni2, @tpambor, and @dhanquna.

As always, I very much welcome your thoughts and feedback in the comments below!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all previous issues of the Zephyr Weekly Update:

Categories
IoT Zephyr

Zephyr Weekly Update – Apr. 11, 2025

Hello, Zephyr enthusiasts! It’s been a couple of busy weeks as we move further into the Zephyr 4.2 development cycle. Let’s dive into some of the significant additions and improvements merged over the past couple weeks.

New CI servers are blazing fast

There are literally hundreds of pull requests being submitted to Zephyr every week. We’re trying our best to have them go through a set of relevant tests on our continuous integration servers so that the proposed changes are effectively working, not causing regressions, etc.

With the sheer amount of pull requests involved, our servers are usually VERY busy, pretty much 24/7. Our infrastructure guru Stephanos recently completed the move to Hetzner as our new provider, and we now have a farm of very beefy AMD EPYC™ Genoa 9454P (48 cores / 96 threads!) powered servers that is significantly speeding up the times it takes for pull requests to go through CI (from several hours before to just about 20 minutes now, in most cases).

Interestingly, GitHub just announced this week that they’re making 96 vCPU runners generally available. Priced at $0.384 per minute (!) of usage, it’s a good reminder that Zephyr’s shared development model, with financial support from its member companies, brings a lot of “free” benefits to the community at large.

Twister harness for power measurement

Testing and validating power consumption of embedded systems is often a very manual and time-consuming task.

A new power harness was recently added to Twister, enabling automated power measurement and validation during test runs. As a reminder, a Twister harness is basically responsible for determining whether a given test passes or not. For example, one would often use the console harness to validate console output against e.g. a regular expression to confirm an application is working as expected.

With the new power harness, it is possible to use an external power monitor (the initial implementation supports the STMicroelectronics X-NUCLEO-LPM01A expansion board running PowerShield) to measure the current drawn by the device under test, and to express some “rules” as to what’s considered success or failure (ex. to ensure the peak consumption never goes above a given value).

The pull request that introduced this new feature (#85130) is probably the best starting point at this stage for you to get a closer look at how this works (and it looks like documentation for it is maybe a bit lacking at the moment, unfortunately). I haven’t spent a lot of time digging into this new feature just yet but I would be really curious to see people start extending it to support other popular power monitors such as Nordic’s PPK2, JouleScope, etc.

Bluetooth Hands-Free Profile (HFP) improvements

PR #77694 has recently been merged and it brings a pretty significant update to the already supported Bluetooth Hands-Free Profile (HFP) and adds support for features such as remote volume control, caller ID, memory dialing, and more (it’s over 11,000 lines of code that were added!).

New boards and SoCs

As always, way too many boards added so I am focusing on just a few 🙂

STM32MP135F-DK Discovery
  • STMicroelectronics STM32MP13 micro-processor is based on Arm Cortex-A7, and a lot of work went into not only adding support for it in Zephyr—PR #87687—but basically also introducing Zephyr support for Cortex-A7 in the first place!
    Should you want to get started with Cortex-A7 on Zephyr, I guess you best bet for now is to then use the STM32MP135 Discovery kit port which, quite naturally, was also introduced in the same PR 🙂
  • You may or may not know that Zephyr is widely used to write Embedded Controller firmwares. For example, laptops such as Chromebooks or Framework Laptops are effectively leveraging Zephyr for all kinds of low-level hardware management stuff (power management, keyboard interfacing, etc.).
    PR #87095 introduces support for ITE Tech’s IT51XXX SoC series. IT51XXX is a 32-bit RISC-V microcontroller with 128KB SRAM, 512K-1M of embedded flash, and a variety of buses and peripherals you’d expect to find on a computer motherboard (SMBus, I3C, cryptographic engine, …)
  • Two new XIAO boards from Seeed Studio: XIAO RA4M1 and XIAO MG24.

Drivers

  • A new MBOX driver for Arm MHUv3 (arm,mhuv3) has been introduced. The MHU (Message Handling Unit) is a standard hardware block found in many multi-core Arm MCUs. It is designed to facilitate low-latency signaling and message passing between different cores. (PR #82564)
    You can read more on Arm MHU here.
  • New sensor drivers added for:
    • TDK ICP201XX pressure sensor (PR #83914),
    • Liteon LTR329 ambient light sensor (PR #85453),
    • ESP32-C6 internal temperature sensor (PR #87175),
    • TI DAC161S997 DAC (PR#86285),
    • NXP PCF2123 RTC (PR #88049),
    • PAT9136 Optical Flow Sensor (PR #86747)
  • New driver for the Sitronix ST7701 display controller (PR#85569).
  • New Espressif LP UART driver targetting the Low Power core found on Espressif SoCs such as ESP32-C6 (PR #87684)
  • New driver for the TI BQ25713 battery charger IC (PR #86791).
  • The Silicon Labs EUSART driver now supports Power Management, Asynchronous API, and DMA (PR #85796).
  • I2S support was added for Espressif ESP32 and ESP32-S2 (PR #83710).
  • The Bosch BMA4xx accelerometer driver now supports streaming API (PR #83575).

Miscellaneous

  • Arduino GIGA Display Shield: Support for the display shield designed for the Arduino GIGA R1 board has been added (PR #85569).
Arduino GIGA Display Shield
  • Coredump In-Memory Backend: The coredump subsystem now features an optional in-memory backend, useful for capturing crash information on systems without persistent storage (PR #87565).
    See CONFIG_DEBUG_COREDUMP_BACKEND_IN_MEMORY.
  • Some long overdue improvements to Zephyr’s JSON library, with better support for parsing/serializing “NaN”, “Infinity”, scientific notation, and char arrays. (PR #86956 & #87580)
  • It’s know possible to suspend/resume the task watchdog, which can be useful when the system needs to go into a suspend state. (PR #87590)

A big thank you to the 41 individuals who had their first pull request accepted this week, 💙 🙌: @peterwangsz, @juickar, @seankyer, @raulgotor, @dereje-demant, @Bucknalla, @PicoBoy2017, @aisuneko, @stefan-golinschi, @KwsBaer, @thanhthe23, @pir0n, @manoj-aerlync, @fimohame, @marekmaskarinec, @Yunshao-Chiang, @tq-delimayuki, @Pharb, @kesyog, @AdamOpenshaw, @vbrzeski, @woobacca, @saimohith-google, @lukkelele, @darrenlu-ambiq, @PeggyCienet, @DavidCerrone, @ivanwagner, @derekvalleroy, @caiohbm, @jamesturton, @rob-robinson-14, @cjwinklhofer, @ajordanr-google, @echistyakov, @bukepo, @cichiwskyj, @Tim-Wang38, @Gibson431, @paultimke, and @robertperkel.

As always, I very much welcome your thoughts and feedback in the comments below!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all previous issues of the Zephyr Weekly Update: