Memory requirements

This page provides information about the amount of flash memory and RAM that is required by the Samples, as well as stack memory requirements for main and zboss threads. Use it to check if your application has enough space for a given configuration. Values are provided for ZBOSS libraries.

Samples were built using the available ZBOSS Zigbee stack. Unless stated otherwise, the default prj.conf was used.

Memory layout in DTS

The Samples define flash partitions in Devicetree (DTS). The Zigbee R23 add-on ships ready-made partition files under dts/ in the Zigbee R23 add-on repository. Use them as-is, or copy and adjust them for your board.

Each layout starts with a base .dtsi file for your SoC. To use MCUboot, FOTA, or Matter together, include a matching .dtsi file after the base file. Some .dtsi files 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 following table lists the available files, which targets they cover, and when to use each variant:

DTS partition layout variants

Variant

Path

Targets

When to use

Base

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)

dts/mcuboot_usb_transport/<soc>_partitions.dtsi

nRF52833 (SoC)
nRF52840 (SoC)
nRF5340 application core (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

dts/matter/<board>_partitions.dtsi

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.

Matter and Zigbee (external flash)

dts/matter/<board>_partitions_ext_flash.dtsi

nRF54L15 DK (DK only)
nRF54LM20 DK (DK only)

Same as the Matter and Zigbee layout, but places slot1_partition on external flash and enlarges slot0_partition. Build with FILE_SUFFIX=matter_fota and SNIPPET=matter_fota_ext_flash.

External flash (FOTA)

dts/ext_flash/<board>_partitions.dtsi

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. Adds boot_partition (MCUboot) and resizes slot0_partition to fit. On the nRF5340 DK, external flash can also hold image-3 (net core upgrade slot). Reference layout for Zigbee FOTA over external flash.

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

See an example for the nRF54LM20 DK with external-flash FOTA in the boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay file:

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

RAM and flash memory requirements

RAM and flash memory requirement values differ depending on the programmed sample.

The following tables and bar charts list memory requirement values for Zigbee samples.

Memory layout is taken from the DTS files used by each sample variant, while memory usage is taken from the build output.

Values are provided in kilobytes (KB). Unsupported sample variants are omitted from each board view. -- indicates that a partition is not used by the sample configuration.

Table columns are grouped by internal NVM, external NVM (when used), and RAM. Application, MCUboot, upgrade slot, and RAM cells show used and free space separated by /. Other NVM columns list the reserved partition size for that region.

Memory requirements for samples running on the nRF52833 DK (nrf52833dk).

Sample
Internal NVM (512 kB)
MCUboot (used)MCUboot (free)Application (used)Application (free)StorageZBOSS NVRAMZBOSS product config
RAM (128 kB)
RAM (used)RAM (free)

Stack memory requirements

The following tables and bar charts list stack memory requirement values for main and zboss threads. These measurements were carried out with Zephyr’s Thread analyzer, using the following Kconfig options for configuration:

  • For the stack memory size of the main thread - CONFIG_MAIN_STACK_SIZE

  • For the stack memory size of the zboss thread - CONFIG_ZBOSS_DEFAULT_THREAD_STACK_SIZE

Values are provided in bytes (B).

Stack usage for samples running on the nRF52840 DK (nrf52840dk).

Sample
main thread (2048 B)
main (used)main (free)
zboss thread (5120 B)
zboss (used)zboss (free)