Categories
IoT Zephyr

Zephyr Weekly Update – LLEXT extension development made easier

A very cool addition this week makes the lives of LLEXT extension developers easier, and makes me think I should already start working on some nice demos for when it will be time to announce Zephyr 3.7 (which is not until late July, though!). Check this out, alongside other cool news, in this new weekly update 🙂

Extension developer kit for LLEXT

Introduced with the latest Zephyr 3.6 release, the LLEXT (Linkable Loadable Extension) subsystem has been gaining a lot of traction lately.

In many cases, people developing the “core” of a Zephyr application designed to be extensible (e.g. a smart home gateway with a fancy display allowing for news “apps” to be added) are not the same people that will be developing the extensions (e.g. an energy monitoring or a weather forecast application, to take the previous example). LLEXT extensions as usually meant as lightweight “plugins” that use a well-controlled and limited set of APIs ; therefore, asking developers to setup a full-blown Zephyr development environment is overkill and error-prone.

This is where the new LLEXT Extension Developer Kit (EDK) comes in: it simplifies the development of extensions outside of the Zephyr tree, by allowing to generate an “SDK” (using west build -t llext-edk target) that packages all the necessary headers and compile flags relevant in the context of a given Zephyr app, effectively providing extension developers with all they need to start hacking away!

Try out the new EDK code sample and see PR #69831 for more details.

Sysbuild multi-target sample

As a way to make it easier to grasp the concepts behind sysbuild, and how it can be used to build multiple facets of your application at once (ex. the actual Zephyr application alongside an MCUboot bootloader), a new “multitarget Hello World” code sample has been introduced.

It showcases a classical Hello World application, except that it also includes the configuration files and explanation on how to build it and flash it for multiple targets (ex. different SoC cores), also leveraging the new hardware model and board target terminology in the process. (PR #69652)

Boards & SoCs

  • New ARM architecture Kconfig options CONFIG_ROMSTART_REGION_ADDRESS and CONFIG_ROMSTART_REGION_SIZE allow to relocate the rom_start region (that typically contains the boot-vector data and irq vectors) to a custom region. (PR #71684)
  • Removed limitation to 4 CPUs for SMP on x86, and also updated Zephyr kernel limitation to 32 CPUs (instead of 8) in the meantime! (PR #60230)
  • Power management support added to Renesas SmartBond UART. (PR #62190)
  • Power management support added to NXP RW61 SoC series. (PR #72758)
  • Added USB support for NXP MCX N947. (PR #72386)
  • Added RTC alarm support for all STM32 MCU series. (PR #71957)

New boards and shields:

STWIN.box
STWIN.box from STMicroelectronics
  • The STWIN.box (a.k.a. STEVAL-STWINBX1) from STMicroelectronics packs an impressive amount of sensors (accelerometer, magnetometers, MEMS microphones, …) and has Wi-Fi, Bluetooth, and NFC connectivity as well. It is now supported in Zephyr 🙂 (PR #72723)
  • STM32H745I Discovery kit is a complete demonstration and development platform for STMicroelectronics Cortex-M4 and M7 based STM32H745XI MCU. (PR #72510)

Networking

  • There is now a really great documentation page for the new HTTP server. It compliments the existing code sample quite well and really gives you all you need to know how to declare static resources, expose WebSocket endpoints, etc.
  • A new net http shell command gives you the ability to get a quick snapshot of the HTTP resources currently available. (PR #72578)
Host:Port       Concurrent/Backlog        Resource type   Methods         Endpoint

192.0.2.1:80    1/10                      dynamic         GET,POST        /dynamic
                                          static          GET             /
                                          websocket       GET             /

1 service and 3 resources found.
  • TLS sockets have been available and use in Zephyr for quite a while, so it was long time due that they’re no longer marked as “experimental)”. (PR #72482)

Drivers

  • There were several improvements made to the LED strip driver class this week, including new API function to get the length of an LED strip at runtime, which is now also a mandatory binding property alongside color-ordering. (PR #71630)
  • I2C driver for ESP32 now allows for clock speed to be configured at runtime. (PR #72380)
  • Added support for GPIO for Apollo3 SoCs. (PR #72438)
  • Added the ability to read the advanced capabilities (GETCAPS) of an I3C target. (PR #71792)
  • Added DAC and ADC drivers for the General Analog Unit (GAU) peripheral as found on NXP RW SoCs. (PR #70506)
  • New driver for Innovative Sensor Technology TSic xx6 temperature sensors. These are low-power, calibrated sensors with accuracy as high as ±0.07 °C at +20 °C. (PR#70432)
  • Added support for DS18S20 High-Precision 1-Wire Digital Thermometer (maxim,ds18s20) to the existing DS18B20 driver. (PR #71286)

Bluetooth

  • Bluetooth BAP (Basic Audio Profile) shell now supports receiving audio data from e.g. a PC over USB, and encoding it using LC3 before sending it. to BAP audio streams. (PR#71084)
  • Added support for Hands-free Audio Gateway (AG), which can be enabled using CONFIG_BT_HFP_AG). The audio gateway profile allows the microphone/speakers of a Bluetooth device (ex. a computer) to be used as an audio input/output device for another Bluetooth device, such as a mobile phone. (PR #70532)
  • Simplified Kconfig options and interface between the host and controller. (PR #72580)

Miscellaneous

  • I think a lot of people don’t necessarily know it, but Zephyr has a complete State Machine Framework (SMF) that can greatly simplify the implementation of protocol stacks, graphical user interfaces, etc. There are a few places in Zephyr where SMF is being used, but until this week there was no dedicated sample showcasing SMF “on its own”. Thanks to an awesome contribution from Glenn Andrews, it’s not the case anymore, and I highly encourage you to check out this new sample! (PR #70921)
  • A new build option, enabled via CONFIG_BUILD_OUTPUT_COMPRESS_DEBUG_SECTIONS, allows to compress debug sections and therefore reduce size of ELF files substantially. (PR #72436)
  • As part of ongoing work to move away from TinyCrypt and towards PSA (#43712), MCUmgr switched to PSA for its crypto operations (ex. checksum and hash functions). (PR #71947)
  • Added initial HID device support to the USB “next” stack. (PR #65801)
  • Several welcome fixes and improvements were made to the scripts/footprint/size_report script. (PR #72316)
  • When using deferred logging, new log_thread_trigger() API allows to essentially flush the log buffer by forcing the log thread to process any pending messages immediately. (PR #71530)
  • nRF Services library is now available for the Nordic HAL. (PR #70245)

A big thank you to the 7 individuals who had their first pull request accepted this week, 💙 🙌: @trunghieulenxp, @jlh-makeen, @darkmoon32, @AyushKot96, @mstumpf585, @dapperlo, and @Rafal-Nordic.

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: