Migration guide to Zephyr v4.3.0 (Working Draft)
This document describes the changes required when migrating your application from Zephyr v4.2.0 to Zephyr v4.3.0.
Any other changes (not directly related to migrating applications) can be found in the release notes.
Build System
Kernel
device_init()
Earlier releases returned a positive +errno value in case of device init failure due to a bug. This is now fixed to return the correct negative -errno value. Applications that implemented workarounds for this issue should now update their code accordingly.
Base Libraries
UTF-8 utils declarations (
utf8_trunc()
,utf8_lcpy()
) have been moved fromutil.h
to a separate include/zephyr/sys/util_utf8.h file.Z_MIN
,Z_MAX
andZ_CLAMP
macros have been renamed tomin
max
andclamp
.
Boards
b_u585i_iot02a/ns: The flash layout was changed to be in sync with the upstream TF-M 2.2.1 board configurations. The new layout expands the flash partitions, moving the secondary ones to the external NOR flash. This change currently prevents upgrade from older Zephyr release images to Zephyr 4.3 release images. More details in the TF-M migration and release notes.
mimxrt11x0: renamed lpadc1 to lpadc2 and renamed lpadc0 to lpadc1.
NXP
frdm_mcxa166
is renamed tofrdm_mcxa346
.NXP
frdm_mcxa276
is renamed tofrdm_mcxa266
.Panasonic
panb511evb
is renamed topanb611evb
.
Device Drivers and Devicetree
ADC
iadc_gecko.c
driver is replaced byadc_silabs_iadc.c
.silabs,gecko-iadc
is replaced bysilabs,iadc
.
Comparator
nordic,nrf-comp
andnordic,nrf-lpcomp
psel
andextrefsel
properties type has been changed to integer. The value of these properties is in the range ofNRF_COMP_AIN0
toNRF_COMP_AIN_VDDH_DIV5
, whereNRF_COMP_AIN0
toNRF_COMP_AIN7
represent the external inputs AIN0 to AIN7,NRF_COMP_AIN_VDD_DIV2
represents internal reference VDD/2, andNRF_COMP_AIN_VDDH_DIV5
represents VDDH/5. The oldstring
properties type is deprecated.
MFD
Driver support for AXP2101 has been separated from the AXP192 one. As a consequence the kconfig symbol
MFD_AXP192_AXP2101
is removed.MFD_AXP192
is now to be used for AXP192 device whileMFD_AXP2101
for the AXP2101 one.
MISC
The nrf_etr driver has been migrated to drivers/debug. As a consequence the related Kconfig symbol was renamed from
NRF_ETR
toDEBUG_NRF_ETR
, along with the rest of theNRF_ETR
symbols. Also the driver needs to be explicitly enabled viaDEBUG_DRIVER
as it is no longer built by default.
PWM
nxp,pca9685
invert
property has been removed and you can now use thePWM_POLARITY_INVERTED
orPWM_POLARITY_NORMAL
flags as specifier cells for space “pwm” are now named:['channel', 'period', 'flags']
(old value:['channel', 'period']
) and#pwm-cells
const value changed from 2 to 3.
Phy
Nodes with compatible property
st,stm32u5-otghs-phy
now need to select the CLKSEL (phy reference clock) in the SYSCFG_OTGHSPHYCR register using the new property clock-reference. The selection directly depends on the value on OTGHSSEL (OTG_HS PHY kernel clock source selection) located in the RCC_CCIPR2 register.
SPI
The macros
SPI_CS_CONTROL_INIT
SPI_CS_CONTROL_INIT_INST
,SPI_CONFIG_DT
,SPI_CONFIG_DT_INST
,SPI_DT_SPEC_GET
, andSPI_DT_SPEC_INST_GET
have been changed so that they do not need to be provided a delay parameter anymore. This is because the timing parameters of a SPI peripheral chip select should now be specified in DT with thespi-cs-setup-delay-ns
andspi-cs-hold-delay-ns
properties. (GitHub #87427).
Sensors
Nodes with compatible property
invensense,icm42688
now additionally need to also includeinvensense,icm4268x
in order to work.
Stepper
zephyr,gpio-stepper
has been replaced byzephyr,h-bridge-stepper
.
Bluetooth
bt_le_cs_test_param
andbt_le_cs_create_config_params
now require providing both the main and sub mode as a single parameter.bt_conn_le_cs_config
now reports both the main and sub mode as a single parameter.bt_conn_le_cs_main_mode
andbt_conn_le_cs_sub_mode
have been replaced withbt_conn_le_cs_mode
.
Bluetooth Controller
The following Kconfig option have been renamed:
bt_ctlr_set_public_addr()
is deprecated. To set the public Bluetooth device address, sending a vendor specific HCI command withbt_hci_cp_vs_write_bd_addr
can be used.
Bluetooth Audio
bt_audio_codec_cfg
now requires setting the target latency and target PHY explicitly, rather than always setting the target latency to “Balanced” and the target PHY to LE 2M. To keep current functionality, set thetarget_latency
toBT_AUDIO_CODEC_CFG_TARGET_LATENCY_BALANCED
andtarget_phy
toBT_AUDIO_CODEC_CFG_TARGET_PHY_2M
. TheBT_AUDIO_CODEC_CFG
macro defaults to these values. (GitHub #93825)Setting the BGS role for GMAP now requires also supporting and implementing the
CONFIG_BT_BAP_BROADCAST_ASSISTANT
. See the Basic Audio Profile (BAP) Broadcast Audio Assistant sample as a reference.The BAP Scan Delegator will no longer automatically update the PA sync state, and
bt_bap_scan_delegator_set_pa_state()
must be used to update the state. If the BAP Scan Delegator is used together with the BAP Broadcast Sink, then the PA state of the receive state of abt_bap_broadcast_sink
will still be automatically updated when the PA state changes. (GitHub #95453)
Bluetooth HCI
The deprecated
ipm
value was removed frombt-hci-bus
devicetree property.ipc
should be used instead.
Ethernet
The
microchip,vsc8541
PHY driver now expects the reset-gpios entry to specify the GPIO_ACTIVE_LOW flag when the reset is being used as active low. Previously the active-low nature was hard-coded into the driver. (GitHub #91726).CRC checksum generation offloading to hardware is now explicitly disabled rather then explicitly enabled in the Xilinx GEM Ethernet driver (
xlnx,gem
). By default, offloading is now enabled by default to improve performance, however, offloading is always disabled for QEMU targets due to the checksum generation in hardware not being emulated regardless of whether it is explicitly disabled via the devicetree or not. (GitHub #95435)Replaced devicetree property
rx-checksum-offload
which enabled RX checksum offloadingdisable-rx-checksum-offload
which now actively disables it.Replaced devicetree property
tx-checksum-offload
which enabled TX checksum offloadingdisable-tx-checksum-offload
which now actively disables it.
Power management
CONFIG_PM_S2RAM
andPM_S2RAM_CUSTOM_MARKING
have been refactored to be automatically managed by SoCs and the devicetree. Applications shall no longer enable them directly, instead, enable or disable the “suspend-to-ram” power states in the devicetree.For the NXP RW61x, the devicetree property
exit-latency-us
has been updated to reflect more accurate, measured wake-up times. For applications utilizing Standby mode (PM3), this update and an increase to themin-residency-us
devicetree property may influence how the system transitions between power modes. In some cases, this could lead to changes in power consumption.
Networking
The HTTP server now respects the configured
_config
value. Check that you provide applicable value toHTTP_SERVICE_DEFINE_EMPTY
,HTTPS_SERVICE_DEFINE_EMPTY
,HTTP_SERVICE_DEFINE
andHTTPS_SERVICE_DEFINE
.The size of socket address length type
socklen_t
has changed. It is now defined to be always 32 bituint32_t
in order to be aligned with Linux. Previously it was defined assize_t
which meant that the size could be either 32 bit or 64 bit depending on system configuration.
CoAP
The
coap_client_response_cb_t
signature has changed. The list of arguments is passed as acoap_client_response_data
pointer instead.The
coap_client_request
has changed to improve the library’s resilience against misconfiguration (i.e. using transient pointers within the struct):The
coap_client_request.path
is now achar
array instead of a pointer. The array size is configurable withCONFIG_COAP_CLIENT_MAX_PATH_LENGTH
.The
coap_client_request.options
is now acoap_client_option
array instead of a pointer. The array size is configurable withCONFIG_COAP_CLIENT_MAX_EXTRA_OPTIONS
.
Modem
CONFIG_MODEM_AT_SHELL_USER_PIPE
has been renamed toCONFIG_MODEM_AT_USER_PIPE
.CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE
has been updated toCONFIG_MODEM_CMUX_WORK_BUFFER_SIZE_EXTRA
, which only takes the number of extra bytes desired over the default of (CONFIG_MODEM_CMUX_MTU
+ 7).
Display
The RGB565 and BGR565 pixel formats were used interchangeably in the display sample. This has now been fixed. Boards and applications that were tested or developed based on the previous sample may be affected by this change (see GitHub #79996 for more information).
SSD1363’s properties using ‘greyscale’ now use ‘grayscale’.
PTP Clock
The doc of
ptp_clock_rate_adjust()
API didn’t provide proper and clear function description. Drivers implemented it to adjust rate ratio relatively based on current frequency. Now PI servo is introduced in both PTP and gPTP, and this API function is changed to use for rate ratio adjusting based on nominal frequency. Drivers implementingptp_clock_rate_adjust()
should be adjusted to account for the new behavior.
Video
The
min_line_count
andmax_line_count
fields have been removed fromvideo_caps
. Application should base on the newvideo_format.size
to allocate buffers.
Other subsystems
Cellular
cellular_access_technology
values have been redefined to align with 3GPP TS 27.007.
cellular_registration_status
values have been extended to align with 3GPP TS 27.007.
Logging
The UART dictionary log parsing script scripts/logging/dictionary/log_parser_uart.py has been deprecated. Instead, the more generic script of scripts/logging/dictionary/live_log_parser.py should be used. The new script supports the same functionality (and more), but requires different command line arguments when invoked.
MCUmgr
The OS mgmt OS/Application Info command’s response for hardware platform has been updated to output the board target instead of the board and board revision, which now includes the SoC and board variant. The old behaviour has been deprecated, but can still be used by enabling
CONFIG_MCUMGR_GRP_OS_INFO_HARDWARE_INFO_SHORT_HARDWARE_PLATFORM
.
RTIO
Callback operations now take an additional argument corresponding to the result code of the first error in the chain.
Callback operations are always called regardless of success/error status of previous submissions in the chain.
Secure storage
The size of
psa_storage_uid_t
, used to identify storage entries, was changed from 64 to 30 bits. This change breaks backward compatibility with previously stored entries for which authentication will start failing. EnableCONFIG_SECURE_STORAGE_64_BIT_UID
if you are updating an existing installation from an earlier version of Zephyr and want to keep the pre-existing entries. (GitHub #94171)
Shell
The MQTT topics related to
SHELL_BACKEND_MQTT
have been renamed. Renamed<device_id>_rx
to<device_id>/sh/rx
and<device_id>_tx
to<device_id>/sh/rx
. The part after the<device_id>
is now configurable viaSHELL_MQTT_TOPIC_RX_ID
andSHELL_MQTT_TOPIC_TX_ID
. This allows keeping the previous topics for backward compatibility. (GitHub #92677).
Modules
The TinyCrypt library was removed as the upstream version is no longer maintained. PSA Crypto API is now the recommended cryptographic library for Zephyr.
Silabs
Aligned the name of the Rail options with the other SiSDK related options:
CONFIG_RAIL_PA_CURVE_HEADER
toCONFIG_SILABS_SISDK_RAIL_PA_CURVE_HEADER
CONFIG_RAIL_PA_CURVE_TYPES_HEADER
toCONFIG_SILABS_SISDK_RAIL_PA_CURVE_TYPES_HEADER
CONFIG_RAIL_PA_ENABLE_CALIBRATION
toCONFIG_SILABS_SISDK_RAIL_PA_ENABLE_CALIBRATION
Fixed name of the
CONFIG_SOC_*
. These option contained PART_NUMBER in their while they shouldn’t.The separate
em3
power state was removed from Series 2 SoCs. The system automatically transitions to EM2 or EM3 depending on hardware peripheral requests for the oscillators.
LVGL
The PIXEL_FORMAT_MONO10 and PIXEL_FORMAT_MONO01 formats were swapped in modules/lvgl/lvgl_display_mono.c, which caused black and white to be inverted when using LVGL with monochrome displays. This issue has now been fixed. Any workarounds previously applied to achieve the expected behavior should be removed, otherwise black and white will be inverted again.