Migrate your application for the nRF54H20 DK to nRF Connect SDK v2.7.0 (for v2.6.99-cs2 users)
This document describes the changes you should be aware of when migrating your application from the nRF Connect SDK v2.6.99-cs2 to the nRF Connect SDK v2.7.0.
Overview
nRF Connect SDK v2.7.0 introduced a series of changes that might affect your existing applications. The following is a summary of the most important ones:
- Updated nRF Connect SDK toolchain
The nRF Connect SDK toolchain has been updated.
- Sysbuild
A new build system was recently introduced in the nRF Connect SDK. For more information, see the Migrating to sysbuild user guide.
- Hardware Model v2
The hardware model was introduced in the nRF Connect SDK v2.7.0.
- nRF54H20 SoC binaries
A new version (v0.5.0) of the nRF54H20 SoC binaries was released. This is the only version compatible with the nRF Connect SDK v2.7.0. The nRF54H20 DK must be in lifecycle state
EMPTYto be provisioned with the new SoC binaries.- DTS changes
The layout of DTS files and the names of DTS nodes related to the updated board names have been updated, which also affects overlay files from applications and samples. If your application required a specific custom board, you must update the custom board files to match the changes done to the nRF54H20 SoC DTS files.
Required changes
The following changes are mandatory to make your application work in the same way as in previous releases.
This section describes the changes related to samples and applications.
Samples and applications
General
Sysbuild A new build system was recently introduced in nRF Connect SDK For more information, see the Migrating to sysbuild user guide.
Hardware Model v2 The hardware model was introduced in the nRF Connect SDK v2.7.0.
Applications using the dfu_application.zip file
For all applications using the dfu_application.zip file generated by the nRF Connect SDK build system:
Make sure that your DFU host tools support the
dfu_application.zipfile with the new format version (1). If the tools do not support the new format version and you cannot update them, you can manually align the content of the zip archive generated with format version1to version0:
Build your application in the same configuration with the nRF Connect SDK v2.6 release to obtain a reference file
dfu_application.zipwith format version0.Manually align the content of the
dfu_application.zipfile generated with format version1:
Align the properties described in the
manifest.jsonfile. Make sure to update all of the fields that are used by the selected DFU host tool.Rename the binary files that are included in the zip archive to match the file names used by the updated manifest. The binary file content is interoperable across nRF Connect SDK releases.
Devicetree
Many devicetree nodes have been re-labeled for consistency. Some nodes have undergone more substantial changes, which are explained in later parts of this section. The following table lists node labels that are no longer used and their equivalent or functionally similar nodes in the revised nRF54H20 DTS files. All old names must be updated in DTS files (overlays, custom boards, or both) and application code.
Old labels
New labels
Notes
bellboard_cpuappcpuapp_bellboardbellboard_cpuradcpurad_bellboardbellboard_cpuseccpusec_bellboardclic_cpupprcpuppr_cliccpuapp_ram0x_nscpuapp_cpurad_ram0x_regionMultiple labels had been used.
cpurad_ram0x_nsipc_shm_area_cpuapp_cpuradcpuapp_ram0x_scpuapp_ram0x_regioncpuapp_sram0xcpuapp_datacpupprcpuppr_vprcpuppr_sramcpuppr_code_datacpurad_ram0x_scpurad_ram0x_regionieee802154cpurad_ieee802154ipc_cpuappcpuapp_cpurad_ipcSpecific to Radiocore.
ipc_cpuradSpecific to Application.
ipc_shm_cpuapp_cpupprcpuapp_cpuppr_ipc_shmipc_shm_cpuapp_cpuradcpuapp_cpurad_ipc_shmipc_shm_cpuapp_cpuseccpuapp_cpusec_ipc_shmipc_shm_cpuapp_cpusyscpuapp_cpusys_ipc_shmipc_shm_cpuppr_cpuappcpuppr_cpuapp_ipc_shmipc_shm_cpurad_cpuappcpurad_cpuapp_ipc_shmipc_shm_cpurad_cpuseccpurad_cpusec_ipc_shmipc_shm_cpurad_cpusyscpurad_cpusys_ipc_shmipc_shm_cpusec_cpuappcpusec_cpuapp_ipc_shmipc_shm_cpusec_cpuradcpusec_cpurad_ipc_shmipc_shm_cpusys_cpuappcpusys_cpuapp_ipc_shmipc_shm_cpusys_cpuradcpusys_cpurad_ipc_shmipc_to_cpuseccpusec_cpuapp_ipcSpecific to Application.
cpusec_cpurad_ipcSpecific to Radiocore.
mram0cpuapp_rx_partitionsSpecific to Application.
cpurad_rx_partitionsSpecific to Radiocore.
mram1cpuapp_rw_partitionsSpecific to Application.
mram10mram1xCovers both MRAM10 and MRAM11 as one contiguous area.
mram11mram10_nvrcpuapp_uicrUsed to have multiple
regvalues.cpurad_uicrficrram20_shared_regionshared_ram20_regionram3x_cpuappcpuapp_dma_regionram3x_cpuradcpurad_dma_regionLinker section is also renamed from
DMA_RAM3x_NETtoDMA_RAM3x_RAD.ram3x_dma_regionshared_ram3x_regionrngprngslot0_partitioncpuapp_slot0_partitionSpecific to Application.
cpurad_slot0_partitionSpecific to Radiocore.
sram0cpuapp_ram0Specific to Application.
cpurad_ram0Specific to Radiocore.
vevif_cpupprcpuppr_vevifvevif_cpusyscpusys_vevifAll
/chosenproperties specific to nRF54H20 have been removed. In case some of these are used in your application code, some suitable replacements are noted in the table below.Removed choice
Notes
nordic,bellboard-cpuappUse node label
cpuapp_bellboard.nordic,bellboard-cpuradUse node label
cpurad_bellboard.nordic,bellboard-cpusecUse node label
cpusec_bellboard.nordic,tdd-etr-bufferTo be replaced in a later version of NCS.
nrf,hsfllUse node label
cpuapp_hsfllorcpurad_hsfll.nrf,resetinfoUse alias
resetinfo.nrf,tz-secure-imageUse chosen
zephyr,code-partition.nrf,tz-non-secure-imagenrf,uicrUse node label
cpuapp_uicrorcpurad_uicr.nrf,uicr-extUse property
ptr-ext-uicrof UICR node.In the board DTS file for the nRF54H20 DK, only the following peripherals are enabled:
Target
Labels
cpuappgrtc,uart136,cpuapp_bellboard,cpurad_bellboard,cpusys_vevif,can120,exmif,gpio0,gpio6,gpio9,gpiote130,pwm130,usbhscpuradgrtc,uart135,cpuapp_bellboard,cpurad_bellboard,cpusys_vevif,dppic130*,dppic132*,ipct130*cpupprgrtc,uart135A peripheral is enabled at the SoC level in
ncs/zephyr/dts/arm/nordic/nrf54h20_cpurad.dtsiSome peripherals are no longer enabled by default.
This means that custom boards and applications that relied on certain peripherals being implicitly enabled, must now explicitly set
status = "okay"on the respective nodes in the board DTS or overlay files. In the SoC DTS for the nRF54H20 DK, all peripherals are disabled, except where noted above.UART output is now enabled by default for all cores. However, when using a custom board, the default baud rate (
current-speedproperty) should be set in the board DTS, as it is no longer set in the SoC DTS.
Memory map:
Each memory region must now set
status = "okay"in order to be included for UICR generation.For the nRF54H20 DK, the default memory regions are defined in
ncs/zephyr/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-memory_map.dtsi. All of them havestatus = "disabled"initially, which allows them to be specified in a common location. Some of them are only enabled for particular cores or relevant samples.Migrating SRAM region definitions:
Example before:
/ { soc { ram0x: memory@2f000000 { reg = <0x2f000000 DT_SIZE_K(768)>; ranges = <0 0x2f000000 0xc0000>; ... cpuapp_ram0x_s: memory@10000 { compatible = "nordic,allocatable-ram"; reg = <0x10000 DT_SIZE_K(260)>; perm-read; perm-write; perm-secure; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x10000 0x41000>; ipc_shm_area_cpusec_cpuapp: memory@0 { reg = <0x0 DT_SIZE_K(4)>; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 DT_SIZE_K(4)>; ipc_shm_cpusec_cpuapp: memory@0 { reg = <0x0 DT_SIZE_K(2)>; }; ipc_shm_cpuapp_cpusec: memory@800 { reg = <0x800 DT_SIZE_K(2)>; }; }; }; }; }; };
Example after:
/ { reserved-memory { cpuapp_ram0x_region: memory@2f010000 { compatible = "nordic,owned-memory"; reg = <0x2f010000 DT_SIZE_K(260)>; perm-read; perm-write; perm-secure; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x2f010000 0x41000>; cpusec_cpuapp_ipc_shm: memory@0 { reg = <0x0 DT_SIZE_K(2)>; }; cpuapp_cpusec_ipc_shm: memory@800 { reg = <0x800 DT_SIZE_K(2)>; }; }; }; };
The
nordic,allocatable-rambinding has been removed and is replaced here withnordic,owned-memory, which supports the same ownership/permission properties. For more information, seencs/zephyr/dts/bindings/reserved-memory/nordic,owned-memory.yaml.Like before, these SRAM regions can be defined anywhere in the DTS, but it is recommended to place them under the
/reserved-memorynode. The global RAM nodes forram0x(and others) no longer exist, so the regions should use absolute addresses.
Migrating MRAM partition definitions:
Example before:
&mram_controller { mram0: mram@e0a6000 { compatible = "nordic,allocatable-mram", "soc-nv-flash"; reg = <0xe0a6000 DT_SIZE_K(360)>; erase-block-size = <4096>; write-block-size = <1>; perm-read; perm-execute; perm-secure; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; slot0_partition: partition@a6000 { reg = <0xa6000 DT_SIZE_K(296)>; }; ppr_code_partition: partition@f0000 { reg = <0xf0000 DT_SIZE_K(64)>; }; }; }; mram1: mram@e100000 { compatible = "nordic,allocatable-mram", "soc-nv-flash"; reg = <0xe100000 DT_SIZE_K(916)>; erase-block-size = <4096>; write-block-size = <1>; perm-read; perm-write; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; dfu_partition: partition@100000 { reg = < 0x100000 DT_SIZE_K(892) >; }; storage_partition: partition@1df000 { reg = < 0x1df000 DT_SIZE_K(24) >; }; }; }; };
Example after:
&mram1x { cpuapp_rx_partitions: cpuapp-rx-partitions { compatible = "nordic,owned-partitions", "fixed-partitions"; perm-read; perm-execute; perm-secure; #address-cells = <1>; #size-cells = <1>; cpuapp_slot0_partition: partition@a6000 { reg = <0xa6000 DT_SIZE_K(296)>; }; cpuppr_code_partition: partition@f0000 { reg = <0xf0000 DT_SIZE_K(64)>; }; }; cpuapp_rw_partitions: cpuapp-rw-partitions { compatible = "nordic,owned-partitions", "fixed-partitions"; perm-read; perm-write; perm-secure; #address-cells = <1>; #size-cells = <1>; dfu_partition: partition@100000 { reg = < 0x100000 DT_SIZE_K(892) >; }; storage_partition: partition@1df000 { reg = < 0x1df000 DT_SIZE_K(24) >; }; }; };
All MRAM partitions must now be organized under the
mram1xnode, which spans both MRAM10 and MRAM11. Themram_controllernode has been removed.The
nordic,allocatable-mrambinding has been removed and is replaced here withnordic,owned-partitions, which no longer derives fromsoc-nv-flash. For more information, seencs/zephyr/dts/bindings/mtd/nordic,owned-partitions.yaml.Without the old
mramnodes in between, all partition offsets are now correctly expressed as relative tomram1x. The only limitation is that it is no longer possible to assign a differenterase-block-sizeper MRAM region.
IPC configuration:
For the nRF54H20 DK, the default IPC nodes are defined in
ncs/zephyr/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-ipc_conf.dtsi. There is exactly one node for each relevant pair of processors, such ascpuapp_cpurad_ipc. Each node also sets the channel numbers for both directions of communication.Local bellboards require additional configuration to receive events from remote cores. Example configuration for Application core:
&cpuapp_bellboard { interrupts = <96 NRF_DEFAULT_IRQ_PRIORITY>; interrupt-names = "irq0"; /* irq0: 0: cpuapp-cpusec, 6: cpuapp-cpusys, 13: cpuapp-cpuppr, 18: cpuapp-cpurad */ nordic,interrupt-mapping = <0x00042041 0>; };
The
nordic,interrupt-mappingproperty must be kept in sync with the other IPC nodes in DTS, which containmboxesspecifiers. Here, the property consists of a channel bitmask for interrupt index 0, where for every specifier of the form<&cpuapp_bellboard N>, the Nth bit is set. For more information, seencs/zephyr/dts/bindings/mbox/nordic,nrf-bellboard-local.yaml.Configuring a bellboard instance with multiple IRQ lines previously required multiple nodes with
compatible = "nordic,mbox-nrf-ids". Now, thiscompatibleproperty has been removed, and IRQ information can be attached to the actual bellboard node.Example before:
&global_peripherals { mbox_local_0: mbox0@9a000 { compatible = "nordic,mbox-nrf-ids"; reg = <0x9a000 0x1000>; interrupts = <96 NRF_DEFAULT_IRQ_PRIORITY>; instance = <0>; #mbox-cells = <1>; }; mbox_local_1: mbox1@9a000 { compatible = "nordic,mbox-nrf-ids"; reg = <0x9a000 0x1000>; interrupts = <97 NRF_DEFAULT_IRQ_PRIORITY>; instance = <1>; #mbox-cells = <1>; }; };
Example after:
&cpuapp_bellboard { interrupts = <96 NRF_DEFAULT_IRQ_PRIORITY>, <97 NRF_DEFAULT_IRQ_PRIORITY>; interrupt-names = "irq0", "irq1"; nordic,interrupt-mapping = <0x0000000f 0>, /* irq0 (#96) handles channels 0-3 */ <0x000000f0 1>; /* irq1 (#97) handles channels 4-7 */ };
VPR co-processors:
Two properties of
nordic,nrf-vpr-coprocessornodes have been updated:loader-img-srcis renamed tosource-memory.loader-img-dstis renamed toexecution-memory. The size of this region can be less than or equal to that ofsource-memory(if set).
Mapping global peripheral interrupts to a VPR can now be described using standard devicetree properties. The custom
global-irqsproperty has been removed.Example before:
&spi130 { status = "reserved"; global-irqs = <421 421 13>; };
Example after:
&spi130 { status = "reserved"; interrupt-parent = <&cpuppr_clic>; };
This can be placed in Application core’s DTS, in order to map the SPI130 IRQ from Application to PPR.
Buttons on a custom board may need to include the new
zephyr,codeproperty. The nRF54H20 DK uses the valuesINPUT_KEY_0throughINPUT_KEY_3. Seencs/zephyr/include/zephyr/dt-bindings/input/input-event-codes.hfor all supported values.
Matter
With the inheritance of Zephyr’s sysbuild in the |NCS|, some changes are provided to the Matter samples and applications:
CONFIG_CHIP_FACTORY_DATA_BUILDKconfig option is deprecated and you need to use theSB_CONFIG_MATTER_FACTORY_DATA_GENERATEKconfig option instead to enable or disable creating the factory data set during building a Matter sample. To enable factory data support on your device, you still need to set theCONFIG_CHIP_FACTORY_DATAtoy.Factory data output files are now located in the
<application_name>/zephyr/directory within the build directory.
CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWAREKconfig option is deprecated in sysbuild and you need to use theSB_CONFIG_MATTER_FACTORY_DATA_MERGE_WITH_FIRMWAREKconfig option instead to enable or disable merging the factory data HEX file with the final firmware HEX file.
SB_CONFIG_MATTER_OTAKconfig option has been added to enable or disable generating Matter OTA package during the building process.
CONFIG_CHIP_OTA_IMAGE_FILE_NAMEKconfig option is deprecated and you need to use theSB_CONFIG_MATTER_OTA_IMAGE_FILE_NAMEKconfig option instead to define Matter OTA output filename.
Note
If you want to build a sample without using sysbuild, you need to use the old Kconfig options.
Libraries
This section describes the changes related to libraries.
MQTT helper library
For applications using the MQTT helper library:
The
CONFIG_MQTT_HELPER_CERTIFICATES_FILEis now replaced byCONFIG_MQTT_HELPER_CERTIFICATES_FOLDER. The new option is a folder path where the certificates are stored. The folder path must be relative to the root of the project.If you are using the MQTT helper library, you must update the Kconfig option to use the new option.
When using the
CONFIG_MQTT_HELPER_PROVISION_CERTIFICATESKconfig option, the certificate files must be in standard PEM format. This means that the PEM files need not be converted to string format anymore.
FEM abstraction layer
For applications using FEM abstraction layer:
The function
fem_tx_power_control_set()replaces the functionfem_tx_gain_set().The function
fem_default_tx_output_power_get()replaces the functionfem_default_tx_gain_get().
Recommended changes
The following changes are recommended for your application to work optimally after the migration.
Samples and applications
Applications using build types
For applications using build types:
The CONF_FILE used for Custom build types is now deprecated and is being replaced with the FILE_SUFFIX variable, inherited from Zephyr. You can read more about it in Custom configurations, Providing CMake options, and the related Zephyr documentation. If your application uses build types, it is recommended to update the
sample.yamlto use the new variable instead of CONF_FILE.
For applications using child images:
With the inheritance of Zephyr’s sysbuild in the |NCS|, the multi-image builds are deprecated. If your application uses parent and child images, it is recommended to migrate your application to sysbuild before the multi-image builds are removed in one of the upcoming nRF Connect SDK releases. See Migrating from multi-image builds to sysbuild. See the documentation in Zephyr for more information about sysbuild.
Matter
- For the Matter samples and applications:
All Partition Manager configuration files (
pm_staticfiles) have been removed from theconfigurationdirectory. Instead, apm_static_<BOARD>file has been created for each target board and placed in the samples’ directories. Setting thePM_STATIC_YML_FILEargument in theCMakeLists.txtfile has been removed, as it is no longer needed.Configuration files
Kconfig.mcuboot.defaults,Kconfig.hci_ipc.defaults, andKconfig.multiprotocol_rpmsg.defaultsthat stored a default configuration for the child images have been removed. This was done because of the Sysbuild integration and the child images deprecation.The Matter samples and applications have been migrated to use sysbuild, though you can still use the child images. To migrate an application from the previous to the new version and keep using child images, complete the following steps:
Copy the content of the image configuration file
prj.conflocated in thesysbuild/<image_name>directory (for example,sysbuild/mcuboot) to theprj.conffile located in thechild_image/<image_name>directory.Copy the content of the board configuration file located in the
sysbuild/<image_name>/boardsdirectory (for example,sysbuild/mcuboot/boards/nrf52840dk_nrf52840.conf) to the board file located in thechild_image/<image_name>/boardsdirectory.
All Partition Manager configuration files (
pm_staticfiles) with the suffixreleasehave been removed from all samples. Those files are now redundant, since the new build system allows using the file without the additional suffix if you use FILE_SUFFIX and it is available in the project’s directory.For example, if you add
-DFILE_SUFFIX=releaseto the CMake arguments while building an nRF Connect SDK Matter sample on thenrf52840dk/nrf52840target, the filepm_static_nrf52840dk_nrf52840.yamlwill be used as a fallback. This means that the filepm_static_nrf52840dk_nrf52840_release.yamlwith the exact same contents is not needed anymore. The CONF_FILE argument is deprecated, but if you want to keep using it within your project, you need to create thepm_static_nrf52840dk_nrf52840_release.yamlfile and copy the content of thepm_static_nrf52840dk_nrf52840.yamlfile to it.
Libraries
This section describes the changes related to libraries.
LwM2M carrier library
Many event defines have received new values. If you are using the values directly in your application, you need to check the events listed in
lwm2m_carrier.h.