Zephyr 4.1.0
We are pleased to announce the release of Zephyr version 4.1.0. Major enhancements with this release include:
- Performance improvements
Multiple performance improvements of core Zephyr kernel functions have been implemented, benefiting all supported hardware architectures.
An official port of the thread_metric RTOS benchmark has also been added to make it easier for developers to measure the performance of Zephyr on their hardware and compare it to other RTOSes.
- Experimental support for IAR compiler
IAR Arm Toolchain can now be used to build Zephyr applications. This is an experimental feature that is expected to be improved in future releases.
- Initial support for Rust on Zephyr
It is now possible to write Zephyr applications in Rust. Rust Language Support is available through an optional Zephyr module, and several code samples are available as a starting point.
- USB MIDI Class Driver
Introduction of a new USB MIDI 2.0 device driver, allowing Zephyr devices to communicate with MIDI controllers and instruments over USB.
- Expanded Board Support
Support for 70 new boards and 11 new shields has been added in this release.
This includes highly popular boards such as Raspberry Pi Pico 2 and WCH CH32V003EVT, several boards with CAN+USB capabilities making them good candidates for running the Zephyr-based open source CANnectivity firmware, and dozens of other boards across all supported architectures.
An overview of the changes required or recommended when migrating your application from Zephyr v4.0.0 to Zephyr v4.1.0 can be found in the separate migration guide.
The following sections provide detailed lists of changes by component.
API Changes
Removed APIs and options
The legacy Bluetooth HCI driver API has been removed. It has been replaced by a Bluetooth HCI APIs that follows the normal Zephyr driver model.
The
CAN_MAX_STD_ID
(replaced byCAN_STD_ID_MASK
) andCAN_MAX_EXT_ID
(replaced byCAN_EXT_ID_MASK
) CAN API macros have been removed.The
can_get_min_bitrate()
(replaced bycan_get_bitrate_min()
) andcan_get_max_bitrate()
(replaced bycan_get_bitrate_max()
) CAN API functions have been removed.The
can_calc_prescaler()
CAN API function has been removed.The
CONFIG_NET_SOCKETS_POSIX_NAMES
option has been removed. It was a legacy option and was used to allow user to call BSD socket API while not enabling POSIX API. This removal means that in order to use POSIX API socket calls, one needs to enable theCONFIG_POSIX_API
option. If the application does not want or is not able to enable that option, then the socket API calls need to be prefixed by azsock_
string.Removed
video_pix_fmt_bpp()
function that was returning a byte count and only supported 8-bit depth tovideo_bits_per_pixel()
returning the bit count and supporting any color depth.The
video_stream_start()
andvideo_stream_stop()
driver APIs have been replaced byvideo_set_stream()
.CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO
The
CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE
option has been removed after being deprecated in favor ofCONFIG_PM_DEVICE_SYSTEM_MANAGED
.The
z_pm_save_idle_exit()
PM API function has been removed.Struct
z_arch_esf_t
has been removed. Usestruct arch_esf
instead.The following networking options have been removed:
CONFIG_NET_PKT_BUF_DATA_POOL_SIZE
CONFIG_NET_TCP_ACK_TIMEOUT
Deprecated APIs and options
the
bt_le_set_auto_conn()
API function. Application developers can achieve the same functionality in their application code by reconnecting to the peer when thebt_conn_cb.disconnected
callback is invoked.CONFIG_NATIVE_APPLICATION
has been deprecated.Deprecated the
stream_flash_erase_page()
from Stream Flash API. The same functionality can be achieved usingflash_area_erase()
orflash_erase()
. Nevertheless erasing of a device, while stream flash is supposed to do so, as configured, will result in data lost from stream flash. There are only two situations where device should be erased directly:when Stream Flash is not configured to do erase on its own
when erase is used for removal of a data prior or after Stream Flash uses the designated area.
The pipe API has been reworked. The new API is enabled by default when
CONFIG_MULTITHREADING
is set.Deprecates the
CONFIG_PIPES
Kconfig option.Introduces the
k_pipe_close(..)
function.k_pipe_put(..)
translates tok_pipe_write(..)
.k_pipe_get(..)
translates tok_pipe_read(..)
.k_pipe_flush(..)
&k_pipe_buffer_flush()
can be translated tok_pipe_reset(..)
.Dynamic allocation of pipes is no longer supported.
k_pipe_alloc_init(..)
API has been removed.k_pipe_cleanup(..)
API has been removed.
Querying the number of bytes in the pipe is no longer supported.
k_pipe_read_avail(..)
API has been removed.k_pipe_write_avail(..)
API has been removed.
For the native_sim target
CONFIG_NATIVE_SIM_NATIVE_POSIX_COMPAT
has been switched ton
by default, and this option has been deprecated.All HWMv1 board name aliases which were added as deprecated in v3.7 are now removed (GitHub #82247).
The TinyCrypt library has been deprecated as the upstream version is no longer maintained. PSA Crypto API is now the recommended cryptographic library for Zephyr.
The
CONFIG_BT_DIS_MODEL
andCONFIG_BT_DIS_MANUF
have been deprecated. Application developers can achieve the same configuration by using the newCONFIG_BT_DIS_MODEL_NUMBER_STR
andCONFIG_BT_DIS_MANUF_NAME_STR
Kconfig options.
New APIs and options
Architectures
Bluetooth
Audio
Host
Mesh
bt_mesh_health_cli::update
callback can be used to periodically update the message published by the Health Client.
Services
The
CONFIG_BT_DIS_MODEL_NUMBER
andCONFIG_BT_DIS_MANUF_NAME
Kconfig options can be used to control the presence of the Model Number String and Manufacturer Name String characteristics inside the Device Information Service (DIS). TheCONFIG_BT_DIS_MODEL_NUMBER_STR
andCONFIG_BT_DIS_MANUF_NAME_STR
Kconfig options are now used to set the string values in these characteristics. They replace the functionality of the deprecatedCONFIG_BT_DIS_MODEL
andCONFIG_BT_DIS_MANUF
Kconfigs.
Build system
Sysbuild
The newly introduced MCUboot swap using offset mode can be selected from sysbuild by using
SB_CONFIG_MCUBOOT_MODE_SWAP_USING_OFFSET
, this mode is experimental.
Crypto
I3C
Management
hawkBit
The hawkBit subsystem now uses the State Machine Framework internally.
MCUmgr
Image management
MGMT_EVT_OP_IMG_MGMT_DFU_CONFIRMED
now has image data fieldimg_mgmt_image_confirmed
.
MCUboot
Signed hex files where an encryption key Kconfig is set now have the encrypted flag set in the image header.
Networking:
CoAP
DHCP
DNS
Ethernet
Allow user to specify protocol extensions when receiving data from Ethernet network. This makes it possible to register a handler for Ethernet protocol type without changing core Zephyr network code.
NET_L3_REGISTER
HTTP
Extended
HTTP_SERVICE_DEFINE
to allow to specify a default fallback resource handler.
IPv4
IPv6
LwM2M
MQTT-SN
Added Gateway Advertisement and Discovery support:
OpenThread
Sockets
Added support for new socket options:
Other
Video
video_set_stream()
driver API has replacedvideo_stream_start()
andvideo_stream_stop()
driver APIs.
Other
New Boards
Adafruit Industries, LLC
Feather M4 Express (
adafruit_feather_m4_express
)Adafruit MacroPad RP2040 (
adafruit_macropad_rp2040
)QT Py ESP32-S3 (
adafruit_qt_py_esp32s3
)
Advanced Micro Devices (AMD), Inc.
ACP 6.0 Xtensa Audio DSP (
acp_6_0_adsp
)
Analog Devices, Inc.
AD-SWIOT1L-SL (
ad_swiot1l_sl
)MAX32650EVKIT (
max32650evkit
)MAX32650FTHR (
max32650fthr
)MAX32660EVSYS (
max32660evsys
)MAX78000EVKIT (
max78000evkit
)MAX78000FTHR (
max78000fthr
)MAX78002EVKIT (
max78002evkit
)
Antmicro
Myra SiP Baseboard (
myra_sip_baseboard
)
BeagleBoard.org Foundation
BeagleY-AI (
beagley_ai
)
FANKE Technology Co., Ltd.
FK750M1-VBT6 (
fk750m1_vbt6
)
Google, Inc.
Icetower Development Board (
google_icetower
)Quincy (
google_quincy
)
Infineon Technologies
PSOC 6 AI Evaluation Kit (
cy8ckit_062s2_ai
)
Khadas
Edge2 (
khadas_edge2
)
Lilygo Shenzhen Xinyuan Electronic Technology Co., Ltd
TTGO T7 Mini32 V1.5 (
ttgo_t7v1_5
)TTGO T8-S3 (
ttgo_t8s3
)
M5Stack
CoreS3 (
m5stack_cores3
)
Makerbase Co., Ltd.
MKS CANable V2.0 (
mks_canable_v20
)
MediaTek Inc.
MT8186 (
mt8186
)MT8188 (
mt8188
)MT8196 (
mt8196
)
NXP Semiconductors
FRDM-MCXW72 (
frdm_mcxw72
)i.MX91 EVK (
imx91_evk
)MCXW72-EVK (
mcxw72_evk
)MIMXRT700-EVK (
mimxrt700_evk
)
Nordic Semiconductor
nRF54L09 PDK (
nrf54l09pdk
)
Norik Systems
Octopus IO-Board (
octopus_io_board
)Octopus SoM (
octopus_som
)
Panasonic Corporation
PAN B511 Evaluation Board (
panb511evb
)
Peregrine Consultoria e Servicos
SAM4L WM-400 Cape Board (
sam4l_wm400_cape
)
Qorvo, Inc.
Decawave DWM3001CDK (
decawave_dwm3001cdk
)
RAKwireless Technology Limited
RAK3172 (
rak3172
)
Raspberry Pi Foundation
Raspberry Pi Pico 2 (
rpi_pico2
)
Realtek Semiconductor Corp.
RTS5912 Evaluation Board (
rts5912_evb
)
Renesas Electronics Corporation
ek_ra2l1 (
ek_ra2l1
)RA4L1 Evaluation Kit (
ek_ra4l1
)RA4M1 Evaluation Kit (
ek_ra4m1
)RA4E1 Fast Prototyping Board (
fpb_ra4e1
)RZ/G3S SMARC Evaluation Board Kit (
rzg3s_smarc
)RA4E1 Voice User Reference Kit (
voice_ra4e1
)
STMicroelectronics
Nucleo C071RB (
nucleo_c071rb
)Nucleo F072RB (
nucleo_f072rb
)Nucleo H7S3L8 (
nucleo_h7s3l8
)Nucleo N657X0-Q (
nucleo_n657x0_q
)Nucleo WB07CC (
nucleo_wb07cc
)STM32F413H Discovery (
stm32f413h_disco
)STM32N6570-DK (
stm32n6570_dk
)
Seeed Technology Co., Ltd
XIAO ESP32C6 (
xiao_esp32c6
)
Shenzhen Fuyuansheng Electronic Technology Co., Ltd.
UCAN (
ucan
)
Silicon Laboratories
SiWx917 Wi-Fi 6 and Bluetooth LE SoC 8 MB Flash Radio Board (SLWRB4338A) (
siwx917_rb4338a
)EFR32xG23 868-915 MHz 20 dBm (xG23-RB4210A) (
xg23_rb4210a
)EFR32xG24 Explorer Kit (xG24-EK2703A) (
xg24_ek2703a
)EFR32xG29 2.4 GHz 8 dBm Buck (xG29-RB4412A) (
xg29_rb4412a
)
Texas Instruments
CC2340R5 LaunchPad (
lp_em_cc2340r5
)
Toradex AG
Verdin iMX8M Mini (
verdin_imx8mm
)
Waveshare Electronics
RP2040-Zero (
rp2040_zero
)
WeAct Studio
MiniSTM32H7B0 Core Board (
mini_stm32h7b0
)STM32H5 Core Board (
weact_stm32h5_core
)
WinChipHead
WCH CH32V003EVT (
ch32v003evt
)
Würth Elektronik GmbH.
Oceanus-I EV (
we_oceanus1ev
)Orthosie-I-EV (
we_orthosie1ev
)
Others
CANbardo (
canbardo
)candleLight (
candlelight
)candleLightFD (
candlelightfd
)ESP32-C3-SUPERMINI (
esp32c3_supermini
)Pro Micro nRF52840 (
promicro_nrf52840
)
New shields
New Drivers
ADC
ARM architecture
Audio
Bluetooth
Charger
Clock control
Comparator
Counter
CPU
DAC
DAI
Display
DMA
DSA
EEPROM
Ethernet
Firmware
Flash controller
FPGA
GPIO
IEEE 802.15.4 HDLC RCP interface
I2C
I3C
IEEE 802.15.4
Input
Interrupt controller
Mailbox
MDIO
Memory controller
MFD
MIPI DSI
Miscellaneous
MMU / MPU
MTD
Networking
PCIe
PHY
Pin control
PWM
Quad SPI
Regulator
RNG
RTC
SDHC
Sensors
Serial controller
SPI
Stepper
TCPC
Timer
USB
Video
Watchdog
Wi-Fi
New Samples
Other notable changes
A header file has been introduced to allocate ID ranges for persistent keys in the PSA Crypto API. It defines the ID ranges allocated to different users of the API (application, subsystems…). Users of the API must now use this header file to construct persistent key IDs. See include/zephyr/psa/key_ids.h for more information. (GitHub #85581)
Space-separated lists support has been removed from Twister configuration files. This feature was deprecated a long time ago. Projects that do still use them can use the scripts/utils/twister_to_list.py script to automatically migrate Twister configuration files.
Test case names for Ztest now include the Ztest suite name, meaning the resulting identifier has three sections and looks like:
<test_scenario_name>.<ztest_suite_name>.<ztest_name>
. These extended identifiers are used in log output, twister.json and testplan.json, as well as for--sub-test
command line parameters.The
--no-detailed-test-id
command line option can be used to shorten the test case name by excluding the test scenario name prefix which is the same as the parent test suite id.Added support for HTTP PUT/PATCH/DELETE methods for HTTP server dynamic resources.
Driver API structures are now available through iterable sections and a new
DEVICE_API_IS
macro has been introduced to allow to check if a device supports a given API. Many shell commands now use this to provide “smarter” auto-completion and only list compatible devices when they expect a device argument.Zephyr’s interactive board catalog has been extended to allow searching for boards based on supported hardware features. A new
zephyr:board-supported-hw
Sphinx directive can now be used in boards’ documentation pages to automatically include a list of the hardware features supported by a board, and many boards have already adopted this new feature in their documentation.