Migration notes for nRF Connect SDK v3.1.0
This document describes the changes required or recommended when migrating your application from nRF Connect SDK v3.0.0 to nRF Connect SDK v3.1.0.
Required changes
The following changes are mandatory to make your application work in the same way as in previous releases.
Build system
In sysbuild, the following CMake extensions have been removed:
sysbuild_dt_nodelabelsysbuild_dt_aliassysbuild_dt_node_existssysbuild_dt_node_has_statussysbuild_dt_propsysbuild_dt_comp_pathsysbuild_dt_num_regssysbuild_dt_reg_addrsysbuild_dt_reg_sizesysbuild_dt_has_chosensysbuild_dt_chosen
You must now use pre-existing devicetree extensions, such as
dt_nodelabel, without thesysbuild_prefix. To specify the sysbuild image, use theTARGETargument in place ofIMAGE.The following example shows one of the removed functions:
sysbuild_dt_chosen( flash_node IMAGE ${DEFAULT_IMAGE} PROPERTY "zephyr,flash" )It should now be modified as follows:
dt_chosen( flash_node TARGET ${DEFAULT_IMAGE} PROPERTY "zephyr,flash" )
nRF54H20
This section describes the changes specific to the nRF54H20 SoC and DK support in the nRF Connect SDK.
nRF54H20 IronSide SE binaries
The nRF54H20 IronSide SE binaries have been updated to version v22.2.0+14. For more information, see IronSide SE ABI compatibility.
Caution
To program the nRF54H20 IronSide SE binaries on your nRF54H20 SoC-based device, your device must be in lifecycle state (LCS)
EMPTY. Devices already provisioned using SUIT-based SoC binaries and in LCSRoTcannot be transitioned back to LCSEMPTY.For more information on provisioning devices, see Bring-up step: Disable onboard J-Link Mass Storage Device (MSD).
SUIT to IronSide SE migration
To migrate your existing nRF Connect SDK v3.0.0 application for the nRF54H20 SoC running SUIT to the nRF Connect SDK v3.1.0 using IronSide SE, see the Migration from SUIT to IronSide SE for the nRF54H20 SoC documentation.
BICR migration from DTS to JSON
To migrate the Board Information Configuration Registers (BICR) configuration from DTS to JSON, see the Migrating nRF54H20 SoC BICR from DTS to JSON documentation.
Samples and applications
This section describes the changes related to samples and applications.
Matter
For the Matter samples and applications:
The
CONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATHKconfig option has been introduced. Previously, the path to the ZAP file was deduced based on hardcoded locations. Now, the location is configured using theCONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATHKconfig option. This change requires you to update your applicationprj.conffile by setting theCONFIG_NCS_SAMPLE_MATTER_ZAP_FILE_PATHoption to point to the location of you ZAP file.
For the Matter light bulb sample:
The deferred attribute persistence implementation has changed in the latest Matter version and you must align it as follows:
Remove the following lines from the
app_task.cppfile located in the application’ssrcdirectory:#include <app/DeferredAttributePersistenceProvider.h> DeferredAttributePersistenceProvider gDeferredAttributePersister(Server::GetInstance().GetDefaultAttributePersister(), Span<DeferredAttribute>(&gCurrentLevelPersister, 1), System::Clock::Milliseconds32(5000));
Add the following lines to the
app_task.cppfile located in the application’ssrcdirectory:#include <app/util/persistence/DefaultAttributePersistenceProvider.h> #include <app/util/persistence/DeferredAttributePersistenceProvider.h> DefaultAttributePersistenceProvider gSimpleAttributePersistence; DeferredAttributePersistenceProvider gDeferredAttributePersister(gSimpleAttributePersistence, Span<DeferredAttribute>(&gCurrentLevelPersister, 1), System::Clock::Milliseconds32(5000));
Modify the
mPostServerInitClbkfunction passed to theNrf::Matter::PrepareServerfunction in theapp_task.cppfile should be modified to call additionally thegSimpleAttributePersistence.Init(Nrf::Matter::GetPersistentStorageDelegate()).
Thread
The OpenThread samples have been updated to directly use the OpenThread stack with the IEEE 802.15.4 radio driver. In this case, the Zephyr networking layer is disabled and its features are not available.
The new architecture option has been enabled by default in the following samples:
If you want to use the architecture option that uses the Zephyr networking layer, you need to manually enable the following Kconfig options in your application
prj.conffile:Or use Snippet
l2.For example, to enable the Zephyr networking layer in the Thread: CLI for the nRF54L15 DK, build the sample with the following command:
west build -p -b nrf54l15dk/nrf54l15/cpuapp -- -Dcli_SNIPPET=l2
Additionally, to enable logging from the Zephyr networking layer, you need to enable the following Kconfig options in your application
prj.conffile:Or use snippet
logging_l2.For example, to enable logging from the Zephyr networking layer in the Thread: CLI for the nRF54L15 DK, build the sample with the following command:
west build -p -b nrf54l15dk/nrf54l15/cpuapp -- -Dcli_SNIPPET="l2;logging_l2"
nRF5340 Audio applications
The nRF Audio applications has been updated to use the Network Buffers API to handle audio data. This change requires you to update your application code to use the new APIs for audio data handling. See Changelog for nRF Connect SDK v3.3.99 for more information.
The audio devices are now identified by a location bitfield instead of a channel. This requires the location bitfield to be set according to your preference. If you are using the
buildprog.pyscript, it will handle the correct write to UICR. You only need to update the locations in thedevices.jsonfile. The new format is: “location”: [“FRONT_LEFT”, “FRONT_RIGHT”]. The optional buildprog tool now uses nRF Util instead of nrfjprog, which has been archived.Note
Support for multiple locations is still under development.
As a device can have multiple audio locations, the location name is no longer included in the advertised device name during DFU.
nRF Desktop
The HID state module has been updated to use the HID keymap utility to map an application-specific key ID to a HID report ID and HID usage ID pair. The
CONFIG_DESKTOP_HID_STATE_HID_KEYMAP_DEF_PATHKconfig option has been removed and needs to be replaced with theCONFIG_DESKTOP_HID_KEYMAP_DEF_PATHKconfig option. The format of the configuration file remains the same.
Libraries
This section describes the changes related to libraries.
nRF Security library:
The
CONFIG_PSA_USE_CRACEN_ASYMMETRIC_DRIVERKconfig option has been replaced byCONFIG_PSA_USE_CRACEN_ASYMMETRIC_ENCRYPTION_DRIVER.
SUPL client and SUPL client OS integration library:
The SUPL client OS integration library dependency on the newlib C library has been removed. To use SUPL with picolibc, v0.8.0 or later of the nRF91 Series SUPL client library is required.
Drivers
This section provides detailed lists of changes by drivers.
ADC drivers
Starting with the nRF Connect SDK v3.1.0, the
NRF_SAADC_GNDanalog input definition has been added. You can use it aszephyr,input-negative = <NRF_SAADC_GND>;to allow negative values in the buffer when using single-ended settings.