Categories
IoT Zephyr

Zephyr Weekly Update – New SoC porting guide

Before diving into this week’s updates, a quick reminder about our upcoming Zephyr Tech Talk, next Thursday, May 30!
We will be discussing all things tracing and profiling, and I am really looking forward to seeing lots of live demos of some of the tools available out there that can really help you understand better what’s really going on under the hood of your favorite RTOS, as well as potentially identify performance bottlenecks.

MQTT-based sensor/actuator code samples

We have a new code sample that might be one of the most comprehensive to date in the Zephyr tree.

It demonstrates how to implement a simple IoT sensor that publishes sensor data over MQTT. IoT 101, you might say, but the sample is a great showcase of the many services one needs to support such a scenario, among which:

  • Establishing network connectivity using DHCP ;
  • Establishing a secure MQTT connection (using TLS 1.2) ;
  • Using JSON to encode sensor data and send it at a user-defined interval (would be curious to see CBOR or other encoding formats introduced as alternatives) ;
  • Subscribing to user-defined topic(s) on the MQTT server, e.g. to receive commands ;
  • etc.

New SoC porting guide

A new documentation page describes the process of porting a new SoC to Zephyr.

This is a most welcome addition, that complements the existing architecture and board porting guides, and will be very useful for anyone looking to add support for a new SoC to Zephyr. (PR #69475)

Boards & SoCs

  • Several additions to the list of peripherals supported for Renesas Smartbond SoCs: memory controller, added power management support to the crypto and MIPI DBI driver, … (PR #68023, #72994, #72819)
  • Apollo 3 SoC series getting some love as well, with new counter driver (PR #72842), I2C (PR #72913), and watchdog (PR #72830)
  • Added support for NXP Kinetis KE1xZ series. KE1xZ MCUs are based on a Cortex-M0+ core, running up to 96 MHz. These MCUs support up to 512 KB flash, 96 KB RAM, and a complete set of analog/digital features. (PR #71670)
  • Added support for Microchip MEC5 SoC family. (PR #72876)

New boards and shields:

  • Added support for NXP FRDM-RW612 board.
    The RW612 is a highly integrated, low-power tri-radio wireless MCU with an integrated 260 MHz ARM Cortex-M33 MCU and Wi-Fi 6 + Bluetooth Low Energy (LE) 5.3 / 802.15.4 radios. (PR #72306)
  • Alongside KE1xZ SoC support, the NXP FRDM-KE15Z is now also supported. It contains a robust TSI (touch sensing interface) module with up to 50 channels, making it highly flexible for handling touch keys.
  • USB device controller now available for nRF54H20 DK. (PR #72774)

Drivers

  • It seems like the Video subsystem is getting some attention recently, and it is really nice to see a new driver just landed for the OV5640 CMOS 5-Megapixel image sensor. (PR #71854)
  • New driver for Festo VEAA-X-3 series proportional pressure regulator. (PR #69047)
  • New LED Strip driver for Texas Instruments TLC59731. TLC59731 is a 3-channel, 8-bit, PWM LED driver with single-wire interface based on the EasySet protocol. (PR #68617)

Miscellaneous

  • A new rtt-console snippet has been introduced to quickly switch serial console output to Segger J-Link RTT.
  • When using the sensor_shell code sample, you can now include a fake sensor implementation, which can help when you don’t have an actual sensor at hand 🙂 (PR #72833)
  • You may now enable CONFIG_EXCEPTION_STACK_TRACE_SYMTAB to have symbol names printed in stack traces on Arm64 and RISC-V. (PR #72973)
  • Added a new module implementing MIPI STPv2 (System Trace Protocol). MIPI STP was developed as a generic base protocol that can be shared by multiple application-specific trace protocols. The new module can be used to decode a stream of STPv2 data. (PR #72151)
  • Add a modem backend statistics module.
    Similar to how you can use kernel stats to e.g monitor how “high” your threads go, you can use this new module to keep an eye on buffer usage within the modem subsystem, and use the information to optimize their size. (PR #72576)
uart:~$ modem_stats buffer
ppp0_rx: used at most: 124 of 2048 (6%)
ppp0_tx: used at most: 2048 of 2048 (100%)
uart@b000_rx: used at most: 233 of 4096 (5%)
uart@b000_tx: used at most: 4062 of 4096 (99%)
cmux_rx: used at most: 124 of 2048 (6%)
cmux_tx: used at most: 2047 of 2048 (99%)
dlci_1_rx: used at most: 124 of 2048 (6%)
dlci_2_rx: used at most: 25 of 1024 (2%)
  • Hierarchical state-machine operations in SMF (State Machine Framework) now follow a more “UML-like” transition flow. (PR #71729)
  • New sys_bitarray_* APIs to now allow “popcount” (count how many bits are set), xor with another bitarray, as well as find the Nth bit set in a region. (PR #72901)
  • New Kconfig, CONFIG_MEM_DOMAIN_ISOLATED_STACKS — on supported architectures, thread stacks within the same memory domains are now isolated, i.e. threads within the same memory domains have no access to others threads’ stacks.
  • Added support for bt_disable in the ISO implementation. (PR #72690)
  • west build now allows to pass the list of shield(s) you want to add to your board via the --shield argument — much more natural than the old way of passing -DSHIELD as a CMake parameter. (PR #72720)
  • USB device “next” stack now has initial support for BOS (Binary Object Store). (PR #72215)

A big thank you to the 7 individuals who had their first pull request accepted this week, 💙 🙌: @alex-bellon, @charliegilliland, @luqasn, @roger1wang-intel, @nicogrx, @zaporozhets, and @srmnw.

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:

By Benjamin Cabé

Benjamin Cabé is a technology enthusiast with a passion for empowering developers to build innovative solutions. He has invented an award-winning open source and open hardware artificial nose that he likes to use as an educational platform for people interested in diving into the world of embedded development.
He is currently a Developer Advocate for the Zephyr Project at the Linux Foundation and lives near Toulouse, France, where he enjoys baking sourdough bread with the help of his artificial nose.

Leave a Reply

Your email address will not be published. Required fields are marked *