Migration guide to Zephyr v3.6.0
This document describes the changes required when migrating your application from Zephyr v3.5.0 to Zephyr v3.6.0.
Any other changes (not directly related to migrating applications) can be found in the release notes.
Build System
The deprecated
prj_<board>.conf
Kconfig file support has been removed, projects that use this should switch to using board Kconfig fragments instead (boards/<board>.conf
).Until now
_POSIX_C_SOURCE
,_XOPEN_SOURCE
, and_XOPEN_SOURCE_EXTENDED
were defined globally when building for the native (ARCH_POSIX
) targets, and_POSIX_C_SOURCE
when building with PicolibC. Since this release, these are set only for the files that need them. If your library or application needed this, you may start getting an “implicit declaration” warning for functions whose prototypes are only exposed if one of these is defined. If so, you can fix it by defining the corresponding macro in your C source file before any include, or by adding the equivalent oftarget_compile_definitions(app PRIVATE _POSIX_C_SOURCE=200809L)
to your application orzephyr_library_compile_definitions(_POSIX_C_SOURCE=200809L)
to your library.Build type by setting
CONF_FILE
toprj_<build>.conf
is now deprecated, users should instead use the new-DFILE_SUFFIX
feature File Suffixes.
Kernel
The system heap size and its availability is now determined by a
K_HEAP_MEM_POOL_SIZE
define instead of theCONFIG_HEAP_MEM_POOL_SIZE
Kconfig option. Subsystems can specify their own custom system heap size requirements by specifying Kconfig options with the prefixCONFIG_HEAP_MEM_POOL_ADD_SIZE_
. The old Kconfig option still exists, but will be overridden if the custom requirements are larger. To force the old Kconfig option to be used, even when its value is less than the indicated custom requirements, a newCONFIG_HEAP_MEM_POOL_IGNORE_MIN
option has been introduced (which defaults being disabled).
Boards
The deprecated Nordic SoC Kconfig option
NRF_STORE_REBOOT_TYPE_GPREGRET
has been removed, applications that use this should switch to using the Boot mode instead.NXP: Enabled linkserver to be the default runner on the following NXP boards:
mimxrt685_evk_cm33
,frdm_k64f
,mimxrt1050_evk
,frdm_kl25z
,mimxrt1020_evk
,mimxrt1015_evk
Modules
Optional Modules
The following modules have been made optional and are not downloaded with west update by default anymore:
canopennode
(GitHub #64139)
To enable them again use the west config manifest.project-filter -- +<module
name>
command, or west config manifest.group-filter -- +optional
to
enable all optional modules, and then run west update
again.
MCUboot
MCUboot’s deprecated
CONFIG_ZEPHYR_TRY_MASS_ERASE
Kconfig option has been removed. If an erase is needed when flashing MCUboot, this should now be provided directly to thewest
command e.g.west flash --erase
. (GitHub #64703)
zcbor
If you have zcbor-generated code that relies on the zcbor libraries through Zephyr, you must regenerate the files using zcbor 0.8.1. Note that the names of generated types and members has been overhauled, so the code using the generated code must likely be changed. For example:
Leading single underscores and all double underscores are largely gone,
Names sometimes gain suffixes like
_m
or_l
for disambiguation.All enum (choice) names have now gained a
_c
suffix, so the enum name no longer matches the corresponding member name exactly (because this broke C++ namespace rules).
The function
zcbor_new_state()
,zcbor_new_decode_state()
and the macroZCBOR_STATE_D
have gained new parameters related to decoding of unordered maps. Unless you are using that new functionality, these can all be set to NULL or 0.The functions
zcbor_bstr_put_term()
andzcbor_tstr_put_term()
have gained a new parametermaxlen
, referring to the maximum length of the parameterstr
. This parameter is passed directly tostrnlen()
under the hood.The function
zcbor_tag_encode()
has been renamed tozcbor_tag_put()
.Printing has been changed significantly, e.g.
zcbor_print()
is now calledzcbor_log()
, andzcbor_trace()
with no parameters is gone, and in its place arezcbor_trace_file()
andzcbor_trace()
, both of which take astate
parameter.
Device Drivers and Devicetree
Devicetree Labels
Various deprecated macros related to the deprecated devicetree label property were removed. These are listed in the following table. The table also provides replacements.
However, if you are still using code like
device_get_binding(DT_LABEL(node_id))
, consider replacing it with something likeDEVICE_DT_GET(node_id)
instead. TheDEVICE_DT_GET()
macro avoids run-time string comparisons, and is also safer because it will fail the build if the device does not exist.Removed macro
Replacement
DT_GPIO_LABEL(node_id, gpio_pha)
DT_PROP(DT_GPIO_CTLR(node_id, gpio_pha), label)
DT_GPIO_LABEL_BY_IDX(node_id, gpio_pha, idx)
DT_PROP(DT_GPIO_CTLR_BY_IDX(node_id, gpio_pha, idx), label)
DT_INST_GPIO_LABEL(inst, gpio_pha)
DT_PROP(DT_GPIO_CTLR(DT_DRV_INST(inst), gpio_pha), label)
DT_INST_GPIO_LABEL_BY_IDX(inst, gpio_pha, idx)
DT_PROP(DT_GPIO_CTLR_BY_IDX(DT_DRV_INST(inst), gpio_pha, idx), label)
DT_SPI_DEV_CS_GPIOS_LABEL(spi_dev)
DT_PROP(DT_SPI_DEV_CS_GPIOS_CTLR(spi_dev), label)
DT_INST_SPI_DEV_CS_GPIOS_LABEL(inst)
DT_PROP(DT_SPI_DEV_CS_GPIOS_CTLR(DT_DRV_INST(inst)), label)
DT_LABEL(node_id)
DT_PROP(node_id, label)
DT_BUS_LABEL(node_id)
DT_PROP(DT_BUS(node_id), label)
DT_INST_LABEL(inst)
DT_INST_PROP(inst, label)
DT_INST_BUS_LABEL(inst)
DT_PROP(DT_BUS(DT_DRV_INST(inst)), label)
Multi-level Interrupts
For platforms that enabled
CONFIG_MULTI_LEVEL_INTERRUPTS
, theIRQ
variant of the Devicetree macros now return the as-seen value in the devicetree instead of the Zephyr multilevel-encoded IRQ number. To get the IRQ number in Zephyr multilevel-encoded format, useIRQN
variant instead. For example, consider the following devicetree:plic: interrupt-controller@c000000 { riscv,max-priority = <7>; riscv,ndev = <1024>; reg = <0x0c000000 0x04000000>; interrupts-extended = <&hlic0 11>; interrupt-controller; compatible = "sifive,plic-1.0.0"; #address-cells = <0x0>; #interrupt-cells = <0x2>; }; uart0: uart@10000000 { interrupts = <10 1>; interrupt-parent = <&plic>; clock-frequency = <0x384000>; reg = <0x10000000 0x100>; compatible = "ns16550"; reg-shift = <0>; };
plic
is a second level interrupt aggregator anduart0
is a child ofplic
.DT_IRQ_BY_IDX(DT_NODELABEL(uart0), 0, irq)
will return10
(as-seen value in the devicetree), whileDT_IRQN_BY_IDX(DT_NODELABEL(uart0), 0)
will return(((10 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11)
.Drivers and applications that are supposed to work in multilevel-interrupt configurations should be updated to use the
IRQN
variant, i.e.:DT_IRQ(node_id, irq)
->DT_IRQN(node_id)
DT_IRQ_BY_IDX(node_id, idx, irq)
->DT_IRQN_BY_IDX(node_id, idx)
DT_IRQ_BY_NAME(node_id, name, irq)
->DT_IRQN_BY_NAME(node_id, name)
DT_INST_IRQ(inst, irq)
->DT_INST_IRQN(inst)
DT_INST_IRQ_BY_IDX(inst, idx, irq)
->DT_INST_IRQN_BY_IDX(inst, idx)
DT_INST_IRQ_BY_NAME(inst, name, irq)
->DT_INST_IRQN_BY_NAME(inst, name)
Analog-to-Digital Converter (ADC)
The io-channel cells of the following devicetree bindings were reduced from 2 (
positive
andnegative
) to the commoninput
, making it possible to use the various ADC DT macros with TI LMP90xxx ADC devices:The io-channel cells of the
microchip,mcp3204
andmicrochip,mcp3208
devicetree bindings were renamed fromchannel
to the commoninput
, making it possible to use the various ADC DT macros with Microchip MCP320x ADC devices.
Bluetooth HCI
The optional
setup()
function in the Bluetooth HCI driver API (enabled throughCONFIG_BT_HCI_SETUP
) has gained a function parameter of typebt_hci_setup_params
. By default, the struct is empty, but drivers can opt-in toCONFIG_BT_HCI_SET_PUBLIC_ADDR
if they support setting the controller’s public identity address, which will then be passed in thepublic_addr
field.The
st,hci-spi-v1
should be used instead ofzephyr,bt-hci-spi
for the boards which are based on ST BlueNRG-MS.
Controller Area Network (CAN)
The native Linux SocketCAN driver, which can now be used in both native_posix and native_sim with or without an embedded C-library, has been renamed to reflect this:
The devicetree compatible was renamed from
zephyr,native-posix-linux-can
tozephyr,native-linux-can
.The main Kconfig option was renamed from
CONFIG_CAN_NATIVE_POSIX_LINUX
toCONFIG_CAN_NATIVE_LINUX
.
Two new structures for holding common CAN controller driver configuration (
struct can_driver_config
) and data (struct can_driver_data
) fields were introduced. Out-of-tree CAN controller drivers need to be updated to use these new, common configuration and data structures along with their initializer macros.The optional
can_get_max_bitrate_t
CAN controller driver callback was removed in favor of a common accessor function. Out-of-tree CAN controller drivers need to be updated to no longer supply this callback.The CAN transceiver API function
can_transceiver_enable()
now takes acan_mode_t
argument for propagating the CAN controller operational mode to the CAN transceiver. Out-of-tree CAN controller and CAN transceiver drivers need to be updated to match this new API function signature.The
CAN_FILTER_FDF
flag for filtering classic CAN/CAN FD frames was removed since no known CAN controllers implement support for this. Applications can still filter on classic CAN/CAN FD frames in their receive callback functions as needed.The
CAN_FILTER_DATA
andCAN_FILTER_RTR
flags for filtering between Data and Remote Transmission Request (RTR) frames were removed since not all CAN controllers implement support for individual RX filtering based on the RTR bit. Applications can now useCONFIG_CAN_ACCEPT_RTR
to either accept incoming RTR frames matching CAN filters or reject all incoming CAN RTR frames (the default). WhenCONFIG_CAN_ACCEPT_RTR
is enabled, applications can still filter between Data and RTR frames in their receive callback functions as needed.The
st,stm32h7-fdcan
CAN controller driver now supports configuring the domain/kernel clock via devicetree. Previously, the driver only supported using the PLL1_Q clock for kernel clock, but now it defaults to the HSE clock, which is the chip default. Boards that use the PLL1_Q clock for FDCAN will need to override theclocks
property as follows:&fdcan1 { clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000100>, <&rcc STM32_SRC_PLL1_Q FDCAN_SEL(1)>; };
Display
ILI9XXX based displays now use the MIPI DBI driver class. These displays must now be declared within a MIPI DBI driver wrapper device, which will manage interfacing with the display. Note that the cmd-data-gpios pin has changed polarity with this update, to align better with the new dc-gpios name. For an example, see below:
/* Legacy ILI9XXX display definition */ &spi2 { ili9340: ili9340@0 { compatible = "ilitek,ili9340"; reg = <0>; spi-max-frequency = <32000000>; reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; cmd-data-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; rotation = <270>; width = <320>; height = <240>; }; }; /* New display definition with MIPI DBI device */ mipi_dbi { compatible = "zephyr,mipi-dbi-spi"; reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; spi-dev = <&spi2>; #address-cells = <1>; #size-cells = <0>; ili9340: ili9340@0 { compatible = "ilitek,ili9340"; reg = <0>; mipi-max-frequency = <32000000>; rotation = <270>; width = <320>; height = <240>; }; };
Flash
The
st,stm32-ospi-nor
andst,stm32-qspi-nor
give the nor flash base address and size (in Bytes) with the reg property as follows. The <size> property is not used anymore.mx25lm51245: ospi-nor-flash@70000000 { compatible = "st,stm32-ospi-nor"; reg = <0x70000000 DT_SIZE_M(64)>; /* 512 Mbits*/ };
General Purpose I/O (GPIO)
The
nxp,pcf8574
driver has been renamed tonxp,pcf857x
. (GitHub #67054) to support pcf8574 and pcf8575. The Kconfig option has been renamed fromCONFIG_GPIO_PCF8574
toCONFIG_GPIO_PCF857X
. The Device Tree can be configured as follows:&i2c { status = "okay"; pcf8574: pcf857x@20 { compatible = "nxp,pcf857x"; status = "okay"; reg = <0x20>; gpio-controller; #gpio-cells = <2>; ngpios = <8>; }; pcf8575: pcf857x@21 { compatible = "nxp,pcf857x"; status = "okay"; reg = <0x21>; gpio-controller; #gpio-cells = <2>; ngpios = <16>; }; };
Input
Touchscreen drivers
focaltech,ft5336
andgoodix,gt911
were using the incorrect polarity for the respectivereset-gpios
. This has been fixed so those signals now have to be flagged asGPIO_ACTIVE_LOW
in the devicetree. (GitHub #64800)
Interrupt Controller
The function signature of the
isr_t
callback function passed to theshared_irq
interrupt controller driver API viashared_irq_isr_register()
has changed. The callback now takes an additional irq_number parameter. Out-of-tree users of this API will need to be updated.
Renesas RA Series Drivers
Several Renesas RA series drivers Kconfig options have been renamed:
CONFIG_CLOCK_CONTROL_RA
->CONFIG_CLOCK_CONTROL_RENESAS_RA
CONFIG_GPIO_RA
->CONFIG_GPIO_RENESAS_RA
CONFIG_PINCTRL_RA
->CONFIG_PINCTRL_RENESAS_RA
CONFIG_UART_RA
->CONFIG_UART_RENESAS_RA
Sensors
The
st,lsm6dsv16x
sensor driver has been changed to support configuration of both int1 and int2 pins. The DT attributeirq-gpios
has been removed and substituted by two new attributes,int1-gpios
andint2-gpios
. These attributes must be configured in the Device Tree similarly to the following example:/ { lsm6dsv16x@0 { compatible = "st,lsm6dsv16x"; int1-gpios = <&gpioa 4 GPIO_ACTIVE_HIGH>; int2-gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>; drdy-pin = <2>; }; };
Serial
Runtime configuration is now disabled by default for Nordic UART drivers. The motivation for the change is that this feature is rarely used and disabling it significantly reduces the memory footprint.
Timer
The
st,stm32-lptim
lptim which is selected for counting ticks during low power modes is identified by stm32_lp_tick_source in the device tree as follows. The stm32_lptim_timer driver has been changed to support this.stm32_lp_tick_source: &lptim1 { status = "okay"; };
Bluetooth
ATT now has its own TX buffer pool. If extra ATT buffers were configured using
CONFIG_BT_L2CAP_TX_BUF_COUNT
, they now instead should be configured throughCONFIG_BT_ATT_TX_COUNT
.The HCI implementation for both the Host and the Controller sides has been renamed for the IPC transport. The
CONFIG_BT_RPMSG
Kconfig option is nowCONFIG_BT_HCI_IPC
, and thezephyr,bt-hci-rpmsg-ipc
Devicetree chosen is nowzephyr,bt-hci-ipc
. The existing sample has also been renamed, fromsamples/bluetooth/hci_rpmsg
tosamples/bluetooth/hci_ipc
. (GitHub #64391)The BT GATT callback list, appended to by
bt_gatt_cb_register()
, is no longer cleared onbt_enable()
. Callbacks can now be registered before the initial call tobt_enable()
, and should no longer be re-registered after abt_disable()
bt_enable()
cycle. (GitHub #63693)The Bluetooth UUID has been modified to rodata in
BT_UUID_DECLARE_16
,BT_UUID_DECLARE_32
andBT_UUID_DECLARE_128
as the return value has been changed toconst
. Any pointer to a UUID must be prefixed withconst
, otherwise there will be a compilation warning. For example changestruct bt_uuid *uuid = BT_UUID_DECLARE_16(xx)
toconst struct bt_uuid *uuid = BT_UUID_DECLARE_16(xx)
. (GitHub #66136)The
bt_l2cap_chan_send()
API no longer allocates buffers from the same pool as its buf parameter when segmenting SDUs into PDUs. In order to reproduce the previous behavior, the application should register the alloc_seg channel callback and allocate from the same pool as buf.The
bt_l2cap_chan_send()
API now requires the application to reserve enough bytes for the L2CAP headers. Callnet_buf_reserve(buf, BT_L2CAP_SDU_CHAN_SEND_RESERVE);
at buffer allocation time to do so.BT_ISO_TIMESTAMP_NONE has been removed and the ts parameter of
bt_iso_chan_send()
has as well.bt_iso_chan_send()
now always sends without timestamp. To send with a timestamp,bt_iso_chan_send_ts()
can be used.The
CONFIG_BT_HCI_RESERVE
andCONFIG_BT_HCI_RAW_RESERVE
Kconfig options were removed. All buffers get by default one byte of headroom now, which HCI transport implementations can rely on (whether they need it or not).
Bluetooth Mesh
The Bluetooth Mesh
model
declaration has been changed to add prefixconst
. Themodel->user_data
,model->elem_idx
andmodel->mod_idx
field has been changed to the new runtime structure, replaced bymodel->rt->user_data
,model->rt->elem_idx
andmodel->rt->mod_idx
separately. (GitHub #65152)The Bluetooth Mesh
element
declaration has been changed to add prefixconst
. Theelem->addr
field has been changed to the new runtime structure, replaced byelem->rt->addr
. (GitHub #65388)Deprecated
CONFIG_BT_MESH_PROV_DEVICE
. This option is replaced by new optionCONFIG_BT_MESH_PROVISIONEE
to be aligned with Mesh Protocol Specification v1.1, section 5.4. (GitHub #64252)Removed the
CONFIG_BT_MESH_V1d1
Kconfig option.Removed the
CONFIG_BT_MESH_TX_SEG_RETRANS_COUNT
,CONFIG_BT_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST
,CONFIG_BT_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP
,CONFIG_BT_MESH_SEG_ACK_BASE_TIMEOUT
,CONFIG_BT_MESH_SEG_ACK_PER_HOP_TIMEOUT
,BT_MESH_SEG_ACK_PER_SEGMENT_TIMEOUT
Kconfig options. They are superseded by theCONFIG_BT_MESH_SAR_TX_SEG_INT_STEP
,CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_COUNT
,CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_WITHOUT_PROG_COUNT
,CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_INT_STEP
,CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_INT_INC
,CONFIG_BT_MESH_SAR_TX_MULTICAST_RETRANS_COUNT
,CONFIG_BT_MESH_SAR_TX_MULTICAST_RETRANS_INT
,CONFIG_BT_MESH_SAR_RX_SEG_THRESHOLD
,CONFIG_BT_MESH_SAR_RX_ACK_DELAY_INC
,CONFIG_BT_MESH_SAR_RX_SEG_INT_STEP
,CONFIG_BT_MESH_SAR_RX_DISCARD_TIMEOUT
,CONFIG_BT_MESH_SAR_RX_ACK_RETRANS_COUNT
Kconfig options.
Bluetooth Audio
The
BT_AUDIO_CODEC_LC3_*
values from<zephyr/bluetooth/audio/lc3.h>
have moved to<zephyr/bluetooth/audio/audio.h>
and have theLC3
part of their names replaced by a more semantically correct name: e.g.BT_AUDIO_CODEC_LC3_CHAN_COUNT
is nowBT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT
,BT_AUDIO_CODEC_LC3_FREQ
is nowBT_AUDIO_CODEC_CAP_TYPE_FREQ
, andBT_AUDIO_CODEC_CONFIG_LC3_FREQ
is nowBT_AUDIO_CODEC_CFG_FREQ
, etc. Similarly the enumerations have also been renamed. E.g.bt_audio_codec_config_freq
is nowbt_audio_codec_cfg_freq
,bt_audio_codec_capability_type
is nowbt_audio_codec_cap_type
,bt_audio_codec_config_type
is nowbt_audio_codec_cfg_type
, etc. (GitHub #67024)The ts parameter of
bt_bap_stream_send()
has been removed.bt_bap_stream_send()
now always sends without timestamp. To send with a timestamp,bt_bap_stream_send_ts()
can be used.The ts parameter of
bt_cap_stream_send()
has been removed.bt_cap_stream_send()
now always sends without timestamp. To send with a timestamp,bt_cap_stream_send_ts()
can be used.
Networking
The CoAP public API has some minor changes to take into account. The
coap_remove_observer()
now returns a result if the observer was removed. This change is used by the newly introduced CoAP server subsystem. Also, therequest
argument forcoap_well_known_core_get()
is madeconst
. (GitHub #64265)CoAP observer events have moved from a callback function in a CoAP resource to the Network Events subsystem. The
CONFIG_COAP_OBSERVER_EVENTS
configuration option has been removed. (GitHub #65936)The CoAP public API function
coap_pending_init()
has changed. The parameterretries
is replaced with a pointer tocoap_transmission_parameters
. This allows to specify retransmission parameters of the confirmable message. It is safe to pass a NULL pointer to use default values. (GitHub #66482)The CoAP public API functions
coap_service_send()
andcoap_resource_send()
have changed. An additional parameter pointer tocoap_transmission_parameters
has been added. It is safe to pass a NULL pointer to use default values. (GitHub #66540)The IGMP multicast library now supports IGMPv3. This results in a minor change to the existing api. The
net_ipv4_igmp_join()
now takes an additional argument of the typeconst struct igmp_param *param
. This allows IGMPv3 to exclude/include certain groups of addresses. If this functionality is not used or available (when using IGMPv2), you can safely pass a NULL pointer. IGMPv3 can be enabled using the KconfigCONFIG_NET_IPV4_IGMPV3
. (GitHub #65293)The network stack now uses a separate IPv4 TTL (time-to-live) value for multicast packets. Before, the same TTL value was used for unicast and multicast packets. The IPv6 hop limit value is also changed so that unicast and multicast packets can have a different one. (GitHub #65886)
The Ethernet phy APIs defined in
<zephyr/net/phy.h>
are removed from syscall list. The APIs were marked as callable from usermode but in practice this does not work as the device cannot be accessed from usermode thread. This means that the API calls will need to made from supervisor mode thread.The zperf ratio between mbps and kbps, kbps and bps is changed to 1000, instead of 1024, to align with iperf ratios.
For network buffer pools maximum allocation size was added to a common structure
struct net_buf_data_alloc
as a new fieldmax_alloc_size
. Similar memberdata_size
ofstruct net_buf_pool_fixed
that was specific only for buffer pools with a fixed size was removed.
Other Subsystems
LoRaWAN
The API to register a callback to provide battery level information to the LoRaWAN stack has been renamed from
lorawan_set_battery_level_callback
tolorawan_register_battery_level_callback()
and the return type is nowvoid
. This is more consistent with similar functions for downlink and data rate changed callbacks. (GitHub #65103)
MCUmgr
MCUmgr applications that make use of serial transports (shell or UART) must now select
CONFIG_CRC
, this was previously erroneously selected if MCUmgr was enabled, when for non-serial transports it was not needed. (GitHub #64078)
Shell
The following subsystem and driver shell modules are now disabled by default. Each required shell module must now be explicitly enabled via Kconfig (GitHub #65307):
The
SHELL_UART_DEFINE
macro now only requires a_name
argument. In the meantime, the macro accepts additional arguments (ring buffer TX & RX size arguments) for compatibility with previous Zephyr version, but they are ignored, and will be removed in future release.CONFIG_SHELL_BACKEND_SERIAL_API
now does not automatically default toCONFIG_SHELL_BACKEND_SERIAL_API_ASYNC
whenCONFIG_UART_ASYNC_API
is enabled,CONFIG_SHELL_ASYNC_API
also has to be enabled in order to use the asynchronous serial shell (GitHub #68475).
ZBus
The
CONFIG_ZBUS_MSG_SUBSCRIBER_NET_BUF_DYNAMIC
andCONFIG_ZBUS_MSG_SUBSCRIBER_NET_BUF_STATIC
zbus options are renamed. Instead, the newCONFIG_ZBUS_MSG_SUBSCRIBER_BUF_ALLOC_DYNAMIC
andCONFIG_ZBUS_MSG_SUBSCRIBER_BUF_ALLOC_STATIC
options should be used. (GitHub #65632)To enable the zbus HLP priority boost, the developer must call the
zbus_obs_attach_to_thread()
inside the attaching thread. The observer will then assume the attached thread priority which will be used by zbus to calculate HLP priority. (GitHub #63183)
Userspace
A number of userspace related functions have been moved out of the
z_
namespace and into the kernel namespace.Z_OOPS
toK_OOPS
Z_SYSCALL_MEMORY
toK_SYSCALL_MEMORY
Z_SYSCALL_MEMORY_READ
toK_SYSCALL_MEMORY_READ
Z_SYSCALL_MEMORY_WRITE
toK_SYSCALL_MEMORY_WRITE
Z_SYSCALL_DRIVER_OP
toK_SYSCALL_DRIVER_OP
Z_SYSCALL_SPECIFIC_DRIVER
toK_SYSCALL_SPECIFIC_DRIVER
Z_SYSCALL_OBJ
toK_SYSCALL_OBJ
Z_SYSCALL_OBJ_INIT
toK_SYSCALL_OBJ_INIT
Z_SYSCALL_OBJ_NEVER_INIT
toK_SYSCALL_OBJ_NEVER_INIT
z_user_from_copy
tok_usermode_from_copy()
z_user_to_copy
tok_usermode_to_copy()
z_user_string_copy
tok_usermode_string_copy()
z_user_string_alloc_copy
tok_usermode_string_alloc_copy()
z_user_alloc_from_copy
tok_usermode_alloc_from_copy()
z_user_string_nlen
tok_usermode_string_nlen()
z_dump_object_error
tok_object_dump_error()
z_object_validate
tok_object_validate()
z_object_find
tok_object_find()
z_object_wordlist_foreach
tok_object_wordlist_foreach()
z_thread_perms_inherit
tok_thread_perms_inherit()
z_thread_perms_set
tok_thread_perms_set()
z_thread_perms_clear
tok_thread_perms_clear()
z_thread_perms_all_clear
tok_thread_perms_all_clear()
z_object_uninit
tok_object_uninit()
z_object_recycle
tok_object_recycle()
z_obj_validation_check
tok_object_validation_check()
Z_SYSCALL_VERIFY_MSG
toK_SYSCALL_VERIFY_MSG
z_object
tok_object
z_object_init
tok_object_init()
z_dynamic_object_aligned_create
tok_object_create_dynamic_aligned()
Architectures
Xtensa
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
no longer has a default in the architecture layer. Instead, SoCs or boards will need to define it.Scratch registers
ZSR_ALLOCA
has been renamed toZSR_A0SAVE
.Renamed files with hyhphens to underscores:
xtensa-asm2-context.h
toxtensa_asm2_context.h
xtensa-asm2-s.h
toxtensa_asm2_s.h
xtensa_asm2.h
has been removed. Usextensa_asm2_context.h
instead for stack frame structs.Renamed functions out of
z_
namespace intoxtensa_
namespace.z_xtensa_irq_enable
toxtensa_irq_enable()
z_xtensa_irq_disable
toxtensa_irq_disable()
z_xtensa_irq_is_enabled
toxtensa_irq_is_enabled()