Welcome to the second edition of the Zephyr Weekly Update series covering the week of March 24-31, 2023. In this series, I try to highlight some of the noteworthy changes that made it into Zephyr over the past week.
This week is all about snippets, a couple interesting new boards, and as always lots of activity on the drivers front. Let’s dive right in!
The most significant update this week is the introduction of Snippets.
If you’re like me, you’ve probably often found yourself reusing similar snippets of configuration (sometimes alongside corresponding devicetree overlays) to add a bit of functionality to your project. Things like overriding the default physical UART and Zephyr console to use a USB CDC-ACM UART one instead, enabling your favorite debugging combo (shell, custom log levels, …), etc.
However, the current build system lacked an extensible and composable solution that allows for capturing and naming such “snippets”, so that they can be referenced at build time, as opposed to copied repeatedly across your various projects.
Enter snippets! Snippets help streamline your project’s configuration by allowing you to define commonly used settings and then reference them when needed. This way, you can maintain a cleaner, more organized project structure while reducing the risk of errors caused by manual copy-pasting or inconsistent configurations across various parts of your project.
If it’s still not 100% clear to you how snippets can help you, check out this sample. It demonstrates how adding and enabling a USB CDC-ACM console to your project is now just a
west build -S cdc-acm-console […] away. This will, behind the scenes, automagically:
- add a
cdc-acm-uartto an existing
- override the chosen
zephyr,consoleso that it uses it.
- set the proper KConfig options so that the USB device stack automatically boots up and is properly configured and will of course enable the new USB-based console.
Boards and SoC support
- Support for the Arduino Giga board dropped shortly before I started this weekly update. It’s an impressive dual-core board from Arduino, which was recently announced and supported in Zephyr from day 1! As of this week, it is now also possible to use it for BLE [cf1ee6f615]
- STMicroelectronics will soon be releasing a new Discovery Kit (STM32H573I-DK) for their STM32H573IIK3Q MCU.
Commit [1f23bd7cf7] added support for this Arm Cortex-M33 based board featuring 2 MB of flash memory, and 640 KB of SRAM. It also has an LCD display and a Wi-Fi module, so it’s getting on my wish list!
- In fact, it goes beyond just this specific board, as support for the complete STM32H5 series has been added [3b1dd7380b]
- Added remote flashing support for MEC172xEVB_ASSY6906 board [efb3ccf2db]
- Implemented cache management API for ARM Cortex-A and Cortex-R [98d4faf099]
- The TMD2620 proximity sensor is the kind of sensor you could find in your phone for detecting when to turn the screen off due to it being close to your ear. Commit [924ac2265d] added support for it, including the integration with Zephyr’s Power Management system.
- A code sample has also been added so you can easily try things out.
- A new experimental driver is available for UART emulation [6180f96799].
- The BP-BASSENSORSMKII Booster Pack from Texas Instruments is a feature-packed shield with tons of sensors (6-axis inertial sensor, 3-axis magnetometer, optical light sensor, temperature, humidity, …) that can be useful in building automation scenarios.
Commit [524f01b60c] added support for it 🙂
- Fabio from Google added an interesting new “longpress” input device that helps deal with making the difference between long-press and short-press events. Press a button for less than a configurable delay? That’s a short press! Otherwise, that’s a long press, and it will emit a different key event [5b36b4fa16]
- Also related to input drivers, it’s now possible to use the newly added kscan input driver to listen for input events and report them on a kscan API. This allows porting kscan drivers to Zephyr’s input APIs while maintaining compatibility with the existing kscan-based applications. [a9735abf84]
- Added flash readout and write protection support for STM32F4 [d652da5acb] [b6078cc906].
- Added documentation for the Battery Charging 1.2 driver [24d5bac58f]
- Added i2s domain clock support for STM32 devices [87f3e331a6]
- New emulator for the PI3USB9201 USB charging detector [9b8c4ee847]
- Added driver for Intel’s ADSP watchdog [ea405eb49e]
- Several improvements around I3C [1f757bc67f] [2f02d6ca81] [62f22f8d3b].
- Expanded AICS (Audio Input Control Service) API support to include audio [33bf1fa0c6]
You may be familiar with the Pmod standard interface that allows to easily attach peripherals to development boards. A new GPIO nexus has been added, allowing you to define your Pmod port as a node in your device tree [9d50b143ae]
I hope you find this update useful. Please share your thoughts in the comments and don’t hesitate to share the article widely to help spread the love for Zephyr! 🪁