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: