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 using nrfjprog, 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 of CONFIG_NATIVE_SIM_SLOWDOWN_TO_REAL_TIME.

  • The DT binding zephyr,native-posix-cpu has been deprecated in favor of zephyr,native-sim-cpu.

  • Zephyr now supports version 1.11.1 of the NEORV32.

  • arduino_uno_r4_minima, arduino_uno_r4_wifi, and mikroe_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, and renesas,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 to dai-id.

  • Renamed the devicetree property afe_name to afe-name.

  • Renamed the devicetree property agent_disable to agent-disable.

  • Renamed the devicetree property ch_num to ch-num.

  • Renamed the devicetree property mono_invert to mono-invert.

  • Renamed the devicetree property quad_ch to quad-ch.

  • Renamed the devicetree property int_odd to int-odd.

Counter

Entropy

Ethernet

  • Removed Kconfig option ETH_STM32_HAL_MII (GitHub #86074). PHY interface type is now selected via the phy-connection-type property in the device tree.

  • ethernet_native_posix has been renamed ethernet_native_tap, and with it its kconfig options: CONFIG_ETH_NATIVE_POSIX and its related options have been deprecated in favor of CONFIG_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 to raspberrypi,rpi-gpio-port, and raspberrypi,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

Timer

Bluetooth

Bluetooth Audio

  • CONFIG_BT_CSIP_SET_MEMBER_NOTIFIABLE has been renamed to CONFIG_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 to BT_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 and respectively. (GitHub #75549)

  • BT_ISO_CHAN_TYPE_CONNECTED has been split into BT_ISO_CHAN_TYPE_CENTRAL and BT_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 for BT_ISO_CHAN_TYPE_CONNECTED can be replaced with an || of the two. (GitHub #75549)

Networking

  • The struct net_linkaddr_storage has been renamed to struct and the old struct net_linkaddr has been removed. The struct 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 struct . This will increase the size of struct 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 struct directly, and which has checks like if (lladdr->addr == NULL), will no longer work as expected (because the addr is not a pointer) and must be changed to if (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 generic to better reflect the purpose of this credential type.

SPI

  • Renamed the device tree property port_sel to port-sel.

  • Renamed the device tree property chip_select to chip-select.

Other subsystems

Modules

Architectures