Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ permissions:
jobs:
Build-samples:
runs-on: ubuntu-24.04
container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v2.7.99
container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v3.4.0-rc1
defaults:
run:
# Bash shell is needed to set toolchain related environment variables in docker container
Expand Down
24 changes: 22 additions & 2 deletions docs/configuring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,27 @@ This library is also used for `Power saving during sleep`_.
Upgrading Zigbee application
****************************

When upgrading the Zigbee application, use the `Static and dynamic configuration`_ of the Partition Manager to ensure that ZBOSS' NVRAM is placed in the same area of flash.
When upgrading the Zigbee application, use Zephyr's devicetree-based flash partitioning to ensure that ZBOSS' NVRAM is placed in the same area of flash.
This is because enabling additional features (for example, Zephyr's `Non-Volatile Storage (NVS)`_) can change the placement of the partition in the flash and the ZBOSS settings can be lost, as the application is not able to find the partition.

The static configuration is required regardless of the application version and the upgrading method (:ref:`lib_zigbee_fota` or `Secure bootloader chain`).
The Partition Manager is deprecated in the |NCS|.
New Zigbee designs and migrated applications should define fixed flash partitions in devicetree instead of using :file:`pm_static*.yml` files.
See `Migrating partition configuration from Partition Manager to devicetree (DTS)`_ in the |NCS| documentation for the general migration workflow.

When Partition Manager is disabled (``SB_CONFIG_PARTITION_MANAGER=n``), the Zigbee add-on requires the following devicetree partition nodes:

* ``zboss_nvram`` — stores ZBOSS non-volatile settings
* ``zboss_product_config`` — stores ZBOSS production configuration (if production config is enabled)

The add-on provides base partition :file:`.dtsi` files in the :file:`dts/` directory of the |addon| repository (for example, :file:`nrf5340_cpuapp_partitions.dtsi` and :file:`nrf54lm20_cpuapp_partitions.dtsi`).
Include the appropriate file from a board-specific devicetree overlay (for example, :file:`boards/<board_target>.overlay`) and adjust partition sizes and addresses as needed.
Samples that use MCUboot also provide matching overlays under :file:`sysbuild/mcuboot/boards/`.

If you are migrating from an existing Partition Manager configuration, use the :file:`scripts/pm_to_dts.py` helper script from the |NCS| to generate devicetree overlays from a configured build directory.
After migration, remove the corresponding :file:`pm_static*.yml` files from your project.

.. important::
If devices are already deployed in the field, the partition addresses and sizes in the new devicetree overlays must match the layout previously defined in the Partition Manager static configuration.
Mismatched partition addresses break backwards compatibility and can prevent DFU from working between old and new firmware images.

The fixed partition layout is required regardless of the application version and the upgrading method (:ref:`lib_zigbee_fota` or `Secure bootloader chain`).
1 change: 1 addition & 0 deletions docs/configuring/configuring_libraries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ This setting reduces the update image size, but the MCUboot must run in the over

The decompression support increases the size of the MCUboot image.
Make sure that the bootloader partition is large enough for the generated MCUboot image, especially if you enable compression on a custom board or application.
For ZBOSS NVRAM placement and the devicetree-based flash layout, see :ref:`zigbee_ug_static_partition`.

The secondary application slot does not have to be resized to use compressed Zigbee FOTA updates.
You can reduce the secondary slot to save flash space, but only if your application's compressed update image always fits in the smaller slot.
Expand Down
1 change: 1 addition & 0 deletions docs/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
.. _`RAM power-down`: https://docs.nordicsemi.com/bundle/ncs-3.2.0/page/nrf/libraries/others/ram_pwrdn.html

.. _`Static and dynamic configuration`: https://docs.nordicsemi.com/bundle/ncs-3.2.0/page/nrf/scripts/partition_manager/partition_manager.html#ug-pm-static
.. _`Migrating partition configuration from Partition Manager to devicetree (DTS)`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_partitions.html
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. _`Migrating partition configuration from Partition Manager to devicetree (DTS)`: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_partitions.html
.. _`Migrating partition configuration from Partition Manager to devicetree (DTS)`: https://docs.nordicsemi.com/bundle/ncs-3.2.0/page/nrf/releases_and_maturity/migration/migration_partitions.html

And later we need to update all the links to 3.4.0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, below we have Chiptool that links to the latest as well. Should we change it there as well?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, since we don't know how the latest will look like in the future.


.. _`Repository types`: https://docs.nordicsemi.com/bundle/ncs-3.2.0/page/nrf/dev_model_and_contributions/code_base.html#repository_types

Expand Down
79 changes: 79 additions & 0 deletions docs/memory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,85 @@ Values are provided for :ref:`ZBOSS libraries <zigbee_zboss>`.
Samples were built using the available :ref:`zigbee_zboss`.
Unless stated otherwise, the default :file:`prj.conf` was used.

Memory layout in DTS
********************

The :ref:`zigbee_samples` define flash partitions in Devicetree (DTS).
The |addon| ships ready-made partition files under :file:`dts/` in the |addon| repository.
Use them as-is, or copy and adjust them for your board.

Each layout starts with a **base** :file:`.dtsi` file for your SoC.
If you need MCUboot, FOTA, or Matter coexistence, include a matching **overlay** :file:`.overlay` below the base file.
Some overlays apply to any board with a given SoC; others apply only to a specific development kit (DK).

Every base layout reserves the end of internal flash for:

* ``storage_partition`` - Zephyr settings storage
* ``zboss_nvram`` - ZBOSS non-volatile data
* ``zboss-product-config`` - ZBOSS product configuration

The table below lists the available files, which targets they cover, and when to use each variant.

.. list-table:: DTS partition layout variants
:header-rows: 1

* - Variant
- Path
- Targets
- When to use

* - Base
- :file:`dts/<soc>_partitions.dtsi`
- | nRF52833 (SoC)
| nRF52840 (SoC)
| nRF52840 Dongle (DK only)
| nRF5340 application and network cores (SoC)
| nRF54L05 (SoC)
| nRF54L10 (SoC)
| nRF54L15 (SoC)
| nRF54LM20 (SoC)
- Required starting point for any Zigbee application.

* - MCUboot (USB transport)
- :file:`dts/overlays/mcuboot_usb_transport/<soc>_partitions.overlay`
- | nRF52833 (SoC)
| nRF52840 (SoC)
| nRF5340 application core (SoC)
| nRF54L05 (SoC)
| nRF54L10 (SoC)
| nRF54L15 (SoC)
| nRF54LM20 (SoC)
- Adds ``boot_partition`` (MCUboot) and resizes ``slot0_partition`` to fit.
Use with sysbuild when the bootloader is updated over USB.

* - Matter and Zigbee coexistence
- :file:`dts/overlays/matter/<board>_partitions.overlay`
- nRF54LM20 DK (DK only)
- Adds ``boot_partition``, ``slot1_partition``, and ``factory_data_partition``, and resizes ``slot0_partition``.
Use when Matter and Zigbee share the same device.

* - External flash (FOTA)
- :file:`dts/overlays/ext_flash/<board>_partitions.overlay`
- | nRF52833 DK (DK only)
| nRF52840 DK (DK only)
| nRF5340 DK (DK only)
| nRF54L10 DK (DK only)
| nRF54L15 DK (DK only)
| nRF54LM20 DK (DK only)
- Keeps the primary image on internal flash and places the secondary upgrade slot (``slot1_partition``) on external flash.
On nRF5340, external flash can also hold ``image-3``.
Reference layout for :ref:`lib_zigbee_fota` over external flash.

To add an overlay file to your application, add an ``#include`` line to :file:`app.overlay` or to a board overlay in :file:`boards/`.
Always include the base :file:`.dtsi` first, then any optional overlay.

Example for the nRF54LM20 DK with external-flash FOTA in :file:`boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay`:

.. code-block:: dts

#include <nrf54lm20_cpuapp_partitions.dtsi>
#include <overlays/ext_flash/nrf54lm20dk_cpuapp_partitions.overlay>

RAM and flash memory requirements
*********************************

Expand Down
37 changes: 37 additions & 0 deletions dts/nrf52833_partitions.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2026 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/delete-node/ &slot1_partition;
/delete-node/ &slot0_partition;
/delete-node/ &storage_partition;

&flash0 {
partitions {
slot0_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0x0 0x79000>;
};

storage_partition: partition@79000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x79000 0x2000>;
};

zboss_nvram: partition@7b000 {
compatible = "zephyr,mapped-partition";
label = "zboss-nvram";
reg = <0x7b000 0x4000>;
};

zboss_product_config: partition@7f000 {
compatible = "zephyr,mapped-partition";
label = "zboss-product-config";
reg = <0x7f000 0x1000>;
};
};
};
37 changes: 37 additions & 0 deletions dts/nrf52840_partitions.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2026 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&flash0 {
partitions {
slot0_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0x0 0xf5000>;
};

storage_partition: partition@f5000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0xf5000 0x2000>;
};

zboss_nvram: partition@f7000 {
compatible = "zephyr,mapped-partition";
label = "zboss-nvram";
reg = <0xf7000 0x8000>;
};

zboss_product_config: partition@ff000 {
compatible = "zephyr,mapped-partition";
label = "zboss-product-config";
reg = <0xff000 0x1000>;
};
};
};
43 changes: 43 additions & 0 deletions dts/nrf52840dongle_partitions.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2026 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&flash0 {
partitions {
nrf5_mbr: partition@0 {
compatible = "zephyr,mapped-partition";
label = "nrf5-mbr";
reg = <0x0 0x1000>;
};

slot0_partition: partition@1000 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0x1000 0xf4000>;
};

storage_partition: partition@f5000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0xf5000 0x2000>;
};

zboss_nvram: partition@f7000 {
compatible = "zephyr,mapped-partition";
label = "zboss-nvram";
reg = <0xf7000 0x8000>;
};

zboss_product_config: partition@ff000 {
compatible = "zephyr,mapped-partition";
label = "zboss-product-config";
reg = <0xff000 0x1000>;
};
};
};
38 changes: 38 additions & 0 deletions dts/nrf5340_cpuapp_partitions.dtsi
Comment thread
edmont marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2026 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/delete-node/ &boot_partition;
/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&flash0 {
partitions {
slot0_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0x0 0xf2000>;
};

storage_partition: partition@f2000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0xf2000 0x2000>;
};

zboss_nvram: partition@f4000 {
compatible = "zephyr,mapped-partition";
label = "zboss-nvram";
reg = <0xf4000 0x8000>;
};

zboss_product_config: partition@ff000 {
compatible = "zephyr,mapped-partition";
label = "zboss-product-config";
reg = <0xff000 0x1000>;
};
};
};
38 changes: 38 additions & 0 deletions dts/nrf54l05_cpuapp_partitions.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2026 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&cpuapp_rram {
partitions {
slot0_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0x0 0x72000>;
};

storage_partition: partition@72000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x72000 0x2000>;
};

zboss_nvram: partition@74000 {
compatible = "zephyr,mapped-partition";
label = "zboss-nvram";
reg = <0x74000 0x8000>;
};

zboss_product_config: partition@7c000 {
compatible = "zephyr,mapped-partition";
label = "zboss-product-config";
reg = <0x7c000 0x1000>;
};
};
};

37 changes: 37 additions & 0 deletions dts/nrf54l10_cpuapp_partitions.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2026 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/delete-node/ &slot0_partition;
/delete-node/ &slot1_partition;
/delete-node/ &storage_partition;

&cpuapp_rram {
partitions {
slot0_partition: partition@0 {
compatible = "zephyr,mapped-partition";
label = "image-0";
reg = <0x0 0xf2000>;
};

storage_partition: partition@f2000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0xf2000 0x2000>;
};

zboss_nvram: partition@f4000 {
compatible = "zephyr,mapped-partition";
label = "zboss-nvram";
reg = <0xf4000 0x8000>;
};

zboss_product_config: partition@fc000 {
compatible = "zephyr,mapped-partition";
label = "zboss-product-config";
reg = <0xfc000 0x1000>;
};
};
};
Loading
Loading