This has been a very busy week for the community, with an above average amount of new drivers and boards getting merged. Speaking of recently added boards, I am very excited to include one, the super tiny M5Stack AtomS3, in my Zephyr Tech Talk presentation next Wednesday! đ
I hope many of you will join, as I will be covering how I ended up migrating my now pretty old, and frankly quite hackish, Artificial Nose project to Zephyr in a matter of hours. I used this opportunity to deep more into some Zephyr features that I hadnât add a chance to touch before, like Zbus, and I canât wait to share my experience with yâall.
You should register to make sure you donât miss the live stream, and of course feel free to also share the event with your network!
Support for C11 threads
The C11 standard introduced a native multi-threading API that aims at establishing a portable API for all things threads.
POSIX is of course a very popular programming model for manipulating threads, but being part of the language itself, the API introduced in the 2011 version of the C standard is effectively (or should be at least!) supported on *any* platform that supports the C11 standard.
#include <stdio.h>
#include <threads.h>
// Thread function
int printHelloWorld(void *arg) {
printf("Hello, World!\n");
return 0;
}
int main() {
thrd_t thread;
// Create a new thread
if (thrd_create(&thread, printHelloWorld, NULL) != thrd_success) {
fprintf(stderr, "Error creating thread\n");
return 1;
}
// Wait for the created thread to terminate
thrd_join(thread, NULL);
return 0;
}
Chris Friedt has been working on bringing C11 threads support to Zephyr and this materialized this week with PRÂ #60759 being merged. Quite interestingly, since Zephyr already exposes a POSIX API, most of the threads.h
APIs end up mapping mostly 1-to-1 to POSIX functions.
Logging to multiple UARTs
A new zephyr,log-uart
chosen node can be used to indicate that log outputs may be sent to multiple UARTs.
Until now, the UART log backend would have been only logging to the zephyr,console
chosen node, but with PRÂ #64917 itâs now possible to have the following kind of node in your Devicetree to indicate the various UARTs where youâd like logs to show up:
/ {
chosen {
zephyr,log-uart = &log_uarts;
};
log_uarts: log_uarts {
compatible = "zephyr,log-uart";
uarts = <&uart0 &uart1>;
};
...
};
New keyboard matrix GPIO driver
A new type of driver has been introduced to allow modeling a keyboard matrix out of any set of GPIOs. The gpio-kbd-matrix
binding allows you to define your keyboard matrix configuration such as:
kbd-matrix {
compatible = "gpio-kbd-matrix";
row-gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>,
<&gpio0 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
col-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>,
<&gpio0 3 GPIO_ACTIVE_LOW>,
<&gpio0 4 GPIO_ACTIVE_LOW>;
no-ghostkey-check;
};
More details in PRÂ #65117.
Boards & SoCs
- The nRF9131 Evaluation Kit from Nordic is a single-board evaluation kit for the nRF9131 SiP for LTE-M and NB-IoT.
- The M5Stack AtomS3 is a *very* tiny ESP32-S3 based developer kit that manages to fit a small 0.85âł LCD display on what is effectively a 1Ă1âł (24Ă24mm) piece of electronics!
Since it also has an on-board accelerometer, it can run the LVGL Accelerometer Chart code sample out-of-the-box!
- The Renesas Starter Kit+ for RZ/T2M is an evaluation and development kit for the RZ/T2M MPU. (PRÂ #64566)
- Support has been added for the Verdin iMX8M Plus Computer on Module (CoM) from Toradex. (PRÂ #61713)
- UP Squared Pro 7000 is now supported. It is the 3rd generation of palm-sized developer board of UP Boards series and it is powered by an Intel Alder Lake N (Intel N-series Platform) SoC. (PRÂ #65019)
- Support has been added for the STM32H7B0Â SoC series. (PRÂ #65092)
Drivers
- New driver for the Linear Technologies LTC2451 ADC, an ultra-tiny 16-bit ADC. (PRÂ #64390)
- New driver for Renesas HS3001 and HS3003 temperature/humidity sensors (PRÂ #63016)
- A charger driver has been added to the already existing regulator driver for the MAX20335 multi-function device. (PRÂ #64971)
- The LPS22DF altimeter / pressure sensor is now supported. It is an ultracompact, piezoresistive, absolute pressure sensor that can be used as a digital output barometer, with an output data rate up to 200 Hz (PRÂ #62028)
- The NXP LPC DMA driver now supports hardware triggering. (PRÂ #64573)
- New driver for NXP FlexRAM memory controller. FlexRAM is a highly configurable and flexible RAM memory array, found on e.g. RT10XX and RT11XX series. (PRÂ #62788)
- New modem driver for Quectel EG25-G. (PRÂ #64746)
- New driver for ExplorIR-M CO2 sensor. A new
co2_polling
code samples was also introduced to make it easy to try things out with this driver (or any other CO2 driver really!). (PRÂ #64621) - A new CAN shell command (
can timing
) adds support for setting raw timing values. (PRÂ #65054)
Miscellaneous
- The inter-core messaging (ICMsg) backend now supports the transfer of dynamically allocated buffers. (PRÂ #58741)
- Added API to BLE Audio CAP to set codec capabilities. (PRÂ #63223)
- Zephyr native simulator is now the recommended target for running Zephyr in your desktop/POSIX environment, and the documentation has been updated to reflect that.
- The UART Shell backend has been reworked to support the asynchronous UART API. (PRÂ #63967)
- A new set of shell commands (
cred ...
) allow to interactively set TLS network credentials. See the list of commands here. (PRÂ #64343) - MCUmgr OS management group now has functions for getting/setting the current time to/from the
rtc
alias device. (PRÂ #64934) - The Bluetooth âbroadcast audio sourceâ code sample now supports using e.g. your host computer as the audio source.
Granted that you are running the sample on a device that has a USB Device stack and Audio support, enablingCONFIG_USE_USB_AUDIO_INPUT
will make your device show up as a sound device when plugged to your computer, and any audio that you will send to this âvirtual speakerâ, will be broadcast over LE Audio! đ
A big thank you to the 11 individuals who had their first pull request accepted this week, đ đ: @TimTTP, @GabrielHAFs, @LipinskiPNordicSemi, @michael-whg, @josuah, @CkovMk, @CharlesDias, @ndaneil, @xvigo, @KamilxPaszkiet, and @mpenate-ellenbytech.
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: