Migration guide to Zephyr v4.5.0 (Working Draft)

This document describes the changes required when migrating your application from Zephyr v4.4.0 to Zephyr v4.5.0.

Any other changes (not directly related to migrating applications) can be found in the release notes.

Common

Build System

Kernel

  • _k_neg_eagain has been renamed to _errno_neg_egain as errno has been migrated out of kernel into lib/libc/common.

Boards

Device Drivers and Devicetree

Haptics

Clock Control

  • The nxp,imxrt11xx-arm-pll binding now uses loop-div and post-div for ARM PLL configuration. The legacy clock-mult and clock-div properties remain supported but are deprecated. Existing RT11xx overlays should be updated using the mapping loop-div = clock-mult * 2 and post-div = clock-div.

Digital Microphone

  • The DMIC driver backend API now uses dmic_driver_api instead of struct _dmic_ops.

    Out-of-tree DMIC drivers must rename their backend API struct definitions and switch their API instances to DEVICE_API(dmic, ...). See GitHub #107695 for examples of how in-tree drivers have been updated. Application code using dmic_configure(), dmic_trigger(), and dmic_read() is not impacted.

Ethernet

  • ETHERNET_CONFIG_TYPE_T1S_PARAM and the related NET_REQUEST_ETHERNET_SET_T1S_PARAM has been removed. phy_set_plca_cfg() together with net_eth_get_phy() should be used instead to set these parameters (GitHub #108136).

  • In the functions implemented by the ethernet_api a additional argument was added for a pointer to net_if. This api is not directly exposed to the application, so only out-of-tree drivers need to be updated. (GitHub #106086)

  • The pinctrl-0 and pinctrl-names devicetree properties for the nxp,enet-mac need to be moved from the MAC node to the parent Ethernet controller node. (GitHub #107352)

Flash

  • jedec,spi-nand now requires a plane-bytes property, which indicates the size of each plane in the flash device. For devices with a single plane, this should be set to the same value as size-bytes.

GPIO

  • The STM32 GPIO driver now returns -EINVAL when attempting to configure a GPIO pin in disabled state with a pull-up/pull-down resistor using gpio_pin_configure(). The driver would previously return 0 without actually honoring those flags (no PU/PD resistor was enabled). Applications encountering this error should remove GPIO_PULL_UP/ GPIO_PULL_DOWN from the flags they provide to gpio_pin_configure(); this will result in the same behavior as before since these flags were effectively ignored. (GitHub #104690)

  • On STM32F1 series, GPIO output pins now use 50 MHz max. speed instead of 10 MHz. (GitHub #104690)

NXP

  • CONFIG_MCUX_LPTMR_TIMER no longer defaults to y based on the /chosen/zephyr,system-timer chosen node being compatible with nxp,lptmr. Out-of-tree SoCs and boards that rely on the LPTMR as the system timer must now explicitly default the symbol in their Kconfig.defconfig (for example default y if PM).

  • Kinetis KE1xF no longer requires a board overlay to designate the system timer when CONFIG_PM is enabled. The SoC DTSI now sets the zephyr,system-timer chosen property, so boards that added the overlay described in the Zephyr 4.4 migration guide can remove it.

SD Host Controller

  • Renamed the Kconfig option CONFIG_SDHC_STM32_POLLING_SUPPORT to CONFIG_SDHC_STM32_DMA_MODE. The new symbol enables DMA (default y); set it to n to use polling mode. (GitHub #101617)

  • Renamed the Kconfig option CONFIG_SDHC_STM32_SDIO to CONFIG_SDHC_STM32_SDMMC. (GitHub #101617)

  • The devicetree compatible st,stm32-sdio was renamed. Use st,stm32-sdmmc instead. With this compatible, the legacy disk driver and the SDHC driver can target the same node. To migrate to the SDHC STM32 SDMMC driver, disable the legacy disk driver:

    CONFIG_SDMMC_STM32=n
    

    (GitHub #101617)

  • For st,stm32-sdmmc, the sdhi-on-gpios property has been consolidated into the existing pwr-gpios property. Replace sdhi-on-gpios with pwr-gpios in out-of-tree devicetree nodes.

STM32

  • SoC DTSI files now consistently use interrupt priority zero for all peripherals. Applications must now explicitly configure interrupt priorities using Devicetree if they previously relied on the values found in SoC DTSI files. (GitHub #106188)

Syscon

  • The syscon API functions syscon_read_reg() and syscon_write_reg() now use uint32_t for the register offset parameter instead of uint16_t. This allows for larger register offsets. Code that explicitly declares uint16_t variables for the register parameter or implements the syscon driver API functions may need to be updated.

WiFi

Bluetooth

Bluetooth Audio

Bluetooth Classic

  • The BR/EDR specific callbacks role_changed and br_mode_changed in bt_conn_cb have been moved into a new sub-struct bt_conn_br_cb, accessible via the br member. Application code using these callbacks must update the designated initializers:

    • .role_changed.br.role_changed

    • .br_mode_changed.br.mode_changed

    (GitHub #108022)

Bluetooth HCI

  • The devicetree compatible bflb,bl70x-bt-hci has been renamed to bflb,bt-hci, now that a single binding covers all Bouffalo Lab on-chip BLE controllers (BL60x/BL70x/BL70XL). Out-of-tree boards and shields must update their devicetree nodes accordingly.

Networking

Ethernet

Other subsystems

  • Demand paging (subsys/demand_paging) is moved under Memory Management into subsys/mem_mgmt/demand_paging. Custom backing store and eviction algorithm code need to be moved there.

  • The ring buffer “item” API in <zephyr/sys/ring_buffer.h> has been deprecated in favor of the new fixed-size queue API in <zephyr/sys/ringq.h>.

    Code storing fixed-size items should migrate to sys_ringq (see sys_ringq Data Structure). Code that only used the item API at the byte level should switch to the byte-mode functions ring_buf_put() / ring_buf_get() calls on the same ring_buf. (GitHub #98255)

Modules

hal_nxp

  • S32K344: The pinmux header file for this SoC was renamed from S32K344-172MQFP-pinctrl.h to S32K344_K324_K314_172HDQFP-pinctrl.h. Out-of-tree boards must update their include directive accordingly:

    #include <nxp/s32/S32K344_K324_K314_172HDQFP-pinctrl.h>
    

Mbed TLS

Architectures

  • A new architecture primitive, arch_cpu_irqs_are_enabled(), has been added. It returns the current interrupt-enable state of the calling CPU without modifying it, complementing arch_irq_unlocked() which inspects a saved key. Out-of-tree architecture ports must provide an implementation.