Welcome to this new edition of your weekly…ish Zephyr update. I have been quite busy over the past few weeks, travelling to Embedded World and Zephyr Developer Summit, and it was hard to find time for this weekly blog.
Speaking of in-person events, you have only a few days left to apply to speak at the upcoming Zephyr Developer Summit Europe 2024, held as part of the Open Source Summit 2024 in Vienna, Austria, on September 16-18!
Deferred device initialization
There have been many discussions in the past few months around improving the flexibility of Zephyr device model, in particular around making it possible to defer the initialization of a device. There are many reasons why one may want to decouple the instantiation of a device from its actual initialization, and whether a device should actually be fully initialized is often a decision worth making at runtime (ex. several devices may be sharing common resources, and only one such device may be actually active at a given point in time).
Now that pull request #67335 has been merged, any device may use the zephyr,deferred-init
property in Devicetree to indicate they shouldn’t be automatically initialized but, rather, leave this step to the discretion of the programmer by means of the new device_init()
API.
Relocation of ARM ELF binaries
In the context of LLEXT (linkable loadable extensions), it is important for Zephyr to be able to process an ELF binary “on the fly” as it needs to relocate the various sections of the file to the proper memory sections. PR #70452 introduced support for all the relocation types for ARM ELF files (i.e. partial and shared linking are now also properlu supported) making it possible to address even more scenarios which, if you think about the new “deferred initialization” mode, may very well include dynamically loading new device drivers in the not so distant future
Boards & SoCs
As there were a lot of things happening over the past three weeks, this section really focuses on the main highlights — please don’t be mad at me if I forgot something significant (and please comment to help correct the mistake!).
- Historically, running Zephyr application on Espressif ESP32 devices involved a second-stage bootloader as the initial bootloader was always the ESP-IDF bootloader. A new “simple boot” mode now allows to build applications that don’t require this second-stage bootloading. This makes for optimized memory and size, and is now the default option when building for ESP32, but MCUboot remains a possible alternative. (PR #70505)
- Renesas SmartBond SoCs now have power management support, and MCU can now enter low-power mode when needed. (PR #61857)
- Frame-pointer based stack unwinding for RISC-V architecture. (PR #69912)
- Improved coredump for RISC-V 64 bits: it now includes all the registers. (PR #70949)
There’s quite a few new boards whose support has been added, including:
- Raspberry Pi 5. (PR #70538)
- Arduino UNO R4 WiFi. (PR #71041)
- STM32L152C Discovery kit. (PR #70765)
- Renesas R-CAR Spider S4 (ARM64). (PR #68141)
- ESP32-S2 and ESP32-S3 Devkit-C. (PR #66462 and #66463)
- Phytec phyBOARD-Electra AM64x. (PR #70965)
- Waveshare ESP32-S3-Touch-LCD-1.28. (PR #67311)
Drivers
- Added a driver for the output diagnostics of the TLE9104 low-side switch. (PR #67029)
- New driver for CHSC6X round display controller, found e.g. on the Seeed Studio Round Display for XIAO. (PR #71073)
- Add support for half-duplex (3-wire) to the SPI controller driver for Raspberry Pi Pico. (PR#69634)
- New input driver for PAW32XX mouse sensors. (PR #71716)
- New driver for Analog Devices AD569x series of low-power output DACs. (PR #71338)
- New loopback disk driver allowing to transparently read/write from/to a file on the filesystem. (PR #69895)
- New driver for ST7796S LCD display controller. (PR #69991)
- Added Altera FPGA bridge support. (PR #71360)
- New I3C driver for Nuvoton NPCX SoCs. (PR #71366)
- Added Murata NCP15XH103 compensation table to generic thermistor driver. (PR #70912)
Miscellaneous
- For architecture that have MMU supported (and enabled!), it is now possible to memory map thread stacks, making it possible to create guard pages that can help catching stack overflows/underflows. (PR #70810)
- A lot of work is going into the Eclipse hawkBit client, to make it more configurable. (see e.g. PR #68806)
- High-speed support has been improved in the new USB device stack, and it’s now USB 2.0 compliant. (PR #67749)
- A new I3C shell module has been introduced. (PR #70773)
- west’s built-in support for generating SPDX SBOM files has been updated to now support SPDX 2.3 (vs. 2.2 before). The main addition is the ability to indicate the
PrimaryPackagePurpose
for each package. (PR #70581) - The Wi-Fi shell module now allows to configure multiple security modes for each network. (PR #71044)
- The code samples for Bluetooth Heartrate monitor have been updated to support extended advertising and hence be long-range compatible on SoCs that support Bluetooth Low Energy Coded PHY. (PR #70257)
A big thank you to the 31 individuals who had their first pull request accepted since my last post, : @arnebdr, @ahaslam2, @achech, @Lahyllas, @ulmanyar, @lkoudelka, @franc0is, @nicogou, @lluiscampos, @jan-kubiznak, @petarsusac, @adityaganesh, @erang20, @nordic-bami, @hardeepsharma95, @ke6zfi, @alvsun, @hansbinderup, @rob-the-dude, @orangecms, @selescop, @doeni98, @jomigo96, @nxpadamm, @nlebedenco, @ABESTM, @SaintNicholas, @gkrulce, @nordic-babu, @raintamer, and @DmytroYaskov.
As always, I very much welcome your thoughts and feedback in the comments below!