Memory requirements

This page provides information about the amount of flash memory and RAM that is required by the Samples. Use it to check if your application has enough space for a given configuration.

RAM and flash memory requirements

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

The following tables and bar charts list memory requirement values for Matter 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).

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 nrf52840dk.

Sample
Internal NVM (1024 kB)
MCUboot (used)MCUboot (free)Application (used)Application (free)Factory dataSettings
External NVM (65536 kB)
Application DFU (used)Application DFU (free)Unused
RAM (256 kB)
RAM (used)RAM (free)

Closure (Debug)

Internal NVM
External NVM
RAM

Closure (Release)

Internal NVM
External NVM
RAM

Contact Sensor (Debug)

Internal NVM
External NVM
RAM

Contact Sensor (Release)

Internal NVM
External NVM
RAM

Light Bulb (Debug)

Internal NVM
External NVM
RAM

Light Bulb (Release)

Internal NVM
External NVM
RAM

Light Switch (Debug)

Internal NVM
External NVM
RAM

Light Switch (Release)

Internal NVM
External NVM
RAM

Smoke CO Alarm (Debug)

Internal NVM
External NVM
RAM

Smoke CO Alarm (Release)

Internal NVM
External NVM
RAM

Temperature Sensor (Debug)

Internal NVM
External NVM
RAM

Temperature Sensor (Release)

Internal NVM
External NVM
RAM

Template (Debug)

Internal NVM
External NVM
RAM

Template (Release)

Internal NVM
External NVM
RAM

Thermostat (Debug)

Internal NVM
External NVM
RAM

Thermostat (Release)

Internal NVM
External NVM
RAM

Window Covering (Debug)

Internal NVM
External NVM
RAM

Window Covering (Release)

Internal NVM
External NVM
RAM

Note

The release configurations are built with Link-Time Optimization (LTO).

Reference Matter memory layouts

The following tables and bar charts show how the Matter stack architecture in the nRF Connect SDK translates to actual memory maps for each of the available Matter platform designs (System-on-Chip, multiprotocol). The memory values match the RAM and flash memory requirements listed.

Each tab shows the memory maps for the development kits supported by the Matter protocol, including two memory maps for the Matter: Weather Station, which uses Nordic Thingy:53.

For more information about configuration of memory layouts in Matter, see Partition layout.

The following memory map is valid for Matter applications running on the nrf52840dk.

Internal flash (size: 0x100000 = 1024 kB)
Bootloader (28 kB)Application (960 kB)Factory data (4 kB)Non-volatile storage (32 kB)
0x0
0x7000
0xf7000
0xf8000
0x100000
Static RAM (sram0) (size: 0x40000 = 256 kB)

SRAM is located at the address ``0x20000000`` in the memory address space of the application.

Static RAM (256 kB)
0x20000000
0x20040000
External flash (size: 0x4000000 = 65536 kB)
Application DFU (960 kB)Free space (64576 kB)
0x0
0xf0000
0x4000000

Diagnostic logs RAM memory requirements

Diagnostic logs support requires changing the RAM memory layout by adding three retained RAM partitions to keep the log data persistent across device reboots. The Matter diagnostic logs snippet (matter-diagnostic-logs) adds these RAM partitions and also reduces the amount of SRAM available for the application by the size of the retained partitions. You can adjust the retained partitions for your needs by editing the Matter diagnostic logs snippet (matter-diagnostic-logs) devicetree file for the relevant board.

The following RAM memory layout is valid for Matter applications running on the nrf52840dk.

Base Application core SRAM size (size: 0x40000 = 256 kB) SRAM is located at the address 0x20000000 in the memory address space of the application.

Partition

Offset

Size

Application core SRAM primary

0 (0x0)

247,8125 kB (0x3DF40)

Crash retention

247,8125 kB (0x3DF40)

192 B (0xC0)

Network logs retention

248 kB (0x3E000)

6 kB (0x1800)

User data logs retention

254 kB (0x3F800)

2 kB (0x800)