Migration guide to Zephyr v4.2.0 (Working Draft)
This document describes the changes required when migrating your application from Zephyr v4.1.0 to Zephyr v4.2.0.
Any other changes (not directly related to migrating applications) can be found in the release notes.
Build System
Kernel
Boards
All boards based on Nordic ICs that used the
nrfjprog
Nordic command-line tool for flashing by default have been modified to instead default to the new nRF Util (nrfutil
) tool. This means that you may need to install nRF Util or, if you prefer to continue usingnrfjprog
, you can do so by invoking west while specfying the runner:west flash -r nrfjprog
. The full documentation for nRF Util can be found here.The config option
CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME
has been deprecated in favor ofCONFIG_NATIVE_SIM_SLOWDOWN_TO_REAL_TIME
.The DT binding
zephyr,native-posix-cpu
has been deprecated in favor ofzephyr,native-sim-cpu
.Zephyr now supports version 1.11.1 of the NEORV32.
arduino_uno_r4_minima
,arduino_uno_r4_wifi
, andmikroe_clicker_ra4m1
have migrated to new FSP-based configurations. While there are no major functional changes, the device tree structure has been significantly revised. The following device tree bindings are now removed:renesas,ra-gpio
,renesas,ra-uart-sci
,renesas,ra-pinctrl
,renesas,ra-clock-generation-circuit
, andrenesas,ra-interrupt-controller-unit
. Instead, use the following replacements: -renesas,ra-gpio-ioport
-renesas,ra-sci-uart
-renesas,ra-pinctrl-pfs
-renesas,ra-cgc-pclk-block
Device Drivers and Devicetree
DAI
Renamed the devicetree property
dai_id
todai-id
.Renamed the devicetree property
afe_name
toafe-name
.Renamed the devicetree property
agent_disable
toagent-disable
.Renamed the devicetree property
ch_num
toch-num
.Renamed the devicetree property
mono_invert
tomono-invert
.Renamed the devicetree property
quad_ch
toquad-ch
.Renamed the devicetree property
int_odd
toint-odd
.
Counter
counter_native_posix
has been renamedcounter_native_sim
, and with it its kconfig options and DT binding.zephyr,native-posix-counter
has been deprecated in favor ofzephyr,native-sim-counter
. AndCONFIG_COUNTER_NATIVE_POSIX
and its related options withCONFIG_COUNTER_NATIVE_SIM
(GitHub #86616).
Entropy
fake_entropy_native_posix
has been renamedfake_entropy_native_sim
, and with it its kconfig options and DT binding.zephyr,native-posix-rng
has been deprecated in favor ofzephyr,native-sim-rng
. AndCONFIG_FAKE_ENTROPY_NATIVE_POSIX
and its related options withCONFIG_FAKE_ENTROPY_NATIVE_SIM
(GitHub #86615).
Ethernet
Removed Kconfig option
ETH_STM32_HAL_MII
(GitHub #86074). PHY interface type is now selected via thephy-connection-type
property in the device tree.ethernet_native_posix
has been renamedethernet_native_tap
, and with it its kconfig options:CONFIG_ETH_NATIVE_POSIX
and its related options have been deprecated in favor ofCONFIG_ETH_NATIVE_TAP
(GitHub #86578).
GPIO
To support the RP2350B, which has many pins, the RaspberryPi-GPIO configuration has been changed. The previous role of
raspberrypi,rpi-gpio
has been migrated toraspberrypi,rpi-gpio-port
, andraspberrypi,rpi-gpio
is now left as a placeholder and mapper. The labels have also been changed along, so no changes are necessary for regular use.
Serial
uart_native_posix
has been renameduart_native_pty
, and with it its kconfig options and DT binding.zephyr,native-posix-uart
has been deprecated in favor ofzephyr,native-pty-uart
.CONFIG_UART_NATIVE_POSIX
and its related options withCONFIG_UART_NATIVE_PTY
. The choiceCONFIG_NATIVE_UART_0
has been replaced withCONFIG_UART_NATIVE_PTY_0
, but now, it is also possible to select if a UART is connected to the process stdin/out instead of a PTY at runtime with the command line option--<uart_name>_stdinout
.CONFIG_NATIVE_UART_AUTOATTACH_DEFAULT_CMD
has been replaced withCONFIG_UART_NATIVE_PTY_AUTOATTACH_DEFAULT_CMD
.CONFIG_UART_NATIVE_WAIT_PTS_READY_ENABLE
has been deprecated. The functionality it enabled is now always enabled as there is no drawbacks from it.CONFIG_UART_NATIVE_POSIX_PORT_1_ENABLE
has been deprecated. This option does nothing now. Instead users should instantiate as manyzephyr,native-pty-uart
nodes as native PTY UART instances they want. (GitHub #86739)
Timer
native_posix_timer
has been renamednative_sim_timer
, and so its kconfig optionCONFIG_NATIVE_POSIX_TIMER
has been deprecated in favor ofCONFIG_NATIVE_SIM_TIMER
, (GitHub #86612).
Bluetooth
Bluetooth Audio
CONFIG_BT_CSIP_SET_MEMBER_NOTIFIABLE
has been renamed toCONFIG_BT_CSIP_SET_MEMBER_SIRK_NOTIFIABLE`
. (GitHub #86763`)
Bluetooth Host
The symbols
BT_LE_CS_TONE_ANTENNA_CONFIGURATION_INDEX_<NUMBER>
in include/zephyr/bluetooth/conn.h have been renamed toBT_LE_CS_TONE_ANTENNA_CONFIGURATION_A<NUMBER>_B<NUMBER>
.The ISO data paths are not longer setup automatically, and shall explicitly be setup and removed by the application by calling
bt_iso_setup_data_path()
andbt_iso_remove_data_path()
respectively. (GitHub #75549)BT_ISO_CHAN_TYPE_CONNECTED
has been split intoBT_ISO_CHAN_TYPE_CENTRAL
andBT_ISO_CHAN_TYPE_PERIPHERAL
to better describe the type of the ISO channel, as behavior for each role may be different. Any existing uses/checks forBT_ISO_CHAN_TYPE_CONNECTED
can be replaced with an||
of the two. (GitHub #75549)
Networking
The struct
net_linkaddr_storage
has been renamed to structnet_linkaddr
and the old structnet_linkaddr
has been removed. The structnet_linkaddr
now contains space to store the link address instead of having pointer that point to the link address. This avoids possible dangling pointers when cloning structnet_pkt
. This will increase the size of structnet_pkt
by 4 octets for IEEE 802.15.4, but there is no size increase for other network technologies like Ethernet. Note that any code that is using structnet_linkaddr
directly, and which has checks likeif (lladdr->addr == NULL)
, will no longer work as expected (because the addr is not a pointer) and must be changed toif (lladdr->len == 0)
if the code wants to check that the link address is not set.TLS credential type
TLS_CREDENTIAL_SERVER_CERTIFICATE
was renamed to more genericTLS_CREDENTIAL_PUBLIC_CERTIFICATE
to better reflect the purpose of this credential type.
SPI
Renamed the device tree property
port_sel
toport-sel
.Renamed the device tree property
chip_select
tochip-select
.