nRF5 SDK for Thread and Zigbee v3.1.0
OpenThread memory layout and requirements

Table of Contents

This page provides information about the layout and the amount of Flash and RAM memory required by the OpenThread stack with an example application. These values are useful to see whether your application has enough space for running in different OpenThread configurations.

OpenThread stack memory layout

The following figures present a typical flash and RAM layout for an application that uses the OpenThread stack in single and multiprotocol scenarios.

thread_mem_resource_map_nosd.svg
OpenThread stack flash and RAM layout


thread_mem_resource_map_sd.svg
OpenThread stack flash and RAM layout for multiprotocol Thread/BLE solution


For details on the values of APP_CODE_BASE and APP_RAM_BASE, see S140 SoftDevice memory resource map and usage.

The following figure shows a typical ROM layout for an application that uses MBR and Bootloader.

thread_mem_resource_map_rom.svg
OpenThread stack ROM layout



Flash and RAM requirements for nRF52840

The following tables list flash memory and RAM requirements for the applications compiled with different options using the GCC compiler with size optimization. The values change depending on the application.

The values in the tables are provided for the CLI example, which works with all OpenThread calls. For this reason, these values are the best approximation of the memory requirements.

You can adjust the RAM memory requirements, for example to support different number of children, buffers, or registered addresses. The default configuration for nRF52840 platform is defined in the following files:

Minimal configuration

Role App Multiprotocol Flash [KB] (OpenThread stack + app) Persistent Data [KB] RAM [KB] (OpenThread stack + app) Flash [KB] (BLE stack) RAM [KB] (BLE stack) Total ROM [KB] Total RAM [KB]
Router cli yes 207 16 51 152 11 375 62
End Device cli yes 157 16 43 152 11 325 54
Router cli no 188 16 50 0 0 204 50
End Device cli no 138 16 42 0 0 154 42

No additional options are used in this configuration.

Feature-rich SDK configuration

Role App Multiprotocol Flash [KB] (OpenThread stack + app) Persistent Data [KB] RAM [KB] (OpenThread stack + app) Flash [KB] (BLE stack) RAM [KB] (BLE stack) Total ROM [KB] Total RAM [KB]
Router cli yes 321 16 69 152 11 489 80
End Device cli yes 265 16 61 152 11 433 72
Router cli no 301 16 68 0 0 317 68
End Device cli no 245 16 60 0 0 261 60

Additional options used in this configuration:

BORDER_AGENT=1 BORDER_ROUTER=1 COAP=1 COMMISSIONER=1 DNS_CLIENT=1 JOINER=1 LINK_RAW=1 MAC_FILTER=1 MTD_NETDIAG=1 SERVICE=1 UDP_FORWARD=1 ECDSA=1 SNTP_CLIENT=1 COAPS=1

Auto-DUT minimal certification configuration

Role App Multiprotocol Flash [KB] (OpenThread stack + app) Persistent Data [KB] RAM [KB] (OpenThread stack + app) Flash [KB] (BLE stack) RAM [KB] (BLE stack) Total ROM [KB] Total RAM [KB]
Router cli yes 289 16 68 152 11 457 79
End Device cli yes 234 16 60 152 11 402 71
Router cli no 270 16 66 0 0 286 66
End Device cli no 215 16 58 0 0 231 58

Additional options used in this configuration:

COMMISSIONER=1 JOINER=1 COAP=1 DNS_CLIENT=1 MTD_NETDIAG=1 BORDER_ROUTER=1 DHCP6_SERVER=1 DHCP6_CLIENT=1 CERT_LOG=1

Auto-DUT SDK certification configuration

Role App Multiprotocol Flash [KB] (OpenThread stack + app) Persistent Data [KB] RAM [KB] (OpenThread stack + app) Flash [KB] (BLE stack) RAM [KB] (BLE stack) Total ROM [KB] Total RAM [KB]
Router cli yes 326 16 70 152 11 494 81
End Device cli yes 270 16 62 152 11 438 73
Router cli no 306 16 68 0 0 322 68
End Device cli no 250 16 60 0 0 266 60

Additional options used in this configuration:

BORDER_AGENT=1 BORDER_ROUTER=1 COAP=1 COMMISSIONER=1 DNS_CLIENT=1 JOINER=1 LINK_RAW=1 MAC_FILTER=1 MTD_NETDIAG=1 SERVICE=1 UDP_FORWARD=1 ECDSA=1 SNTP_CLIENT=1 COAPS=1 DHCP6_SERVER=1 DHCP6_CLIENT=1 CERT_LOG=1

Typical device configuration

Role App Multiprotocol Flash [KB] (OpenThread stack + app) Persistent Data [KB] RAM [KB] (OpenThread stack + app) Flash [KB] (BLE stack) RAM [KB] (BLE stack) Total ROM [KB] Total RAM [KB]
Router cli yes 270 16 67 152 11 438 78
End Device cli yes 220 16 59 152 11 388 70
Router cli no 251 16 66 0 0 267 66
End Device cli no 201 16 58 0 0 217 58

Additional options used in this configuration:

JOINER=1 DHCP_CLIENT=1 DNS_CLIENT=1 COAP=1

Typical Border Router configuration

Role App Multiprotocol Flash [KB] (OpenThread stack + app) Persistent Data [KB] RAM [KB] (OpenThread stack + app) Flash [KB] (BLE stack) RAM [KB] (BLE stack) Total ROM [KB] Total RAM [KB]
Router cli yes 278 16 68 152 11 446 79
End Device cli yes 230 16 60 152 11 398 71
Router cli no 258 16 66 0 0 274 66
End Device cli no 211 16 58 0 0 227 58

Additional options used in this configuration:

JOINER=1 DHCP_SERVER=1 DHCP_CLIENT=1 COAP=1 BORDER_AGENT=1 BORDER_ROUTER=1 MTD_NETDIAG=1 UDP_FORWARD=1

Flash and RAM requirements for nRF52811

The following tables list flash memory and RAM requirements for the RCP application compiled with typical options using the GCC compiler with size optimization. The values may change depending on the application.

The values in the tables are provided for the RCP example which is a typical use case for nRF52811. For this reason, these values are the best approximation of the memory requirements.

RCP/MTD SDK configuration

Role App Flash [KB] (OpenThread stack + app) Persistent Data [KB] RAM [KB] (OpenThread stack + app) Total ROM [KB] Total RAM [KB]
Radio Co-Processor rcp 65 8 9 73 9

Additional options used in this configuration:

BORDER_ROUTER=1 COAP=1 DNS_CLIENT=1 LINK_RAW=1 MAC_FILTER=1 MTD_NETDIAG=1

Documentation feedback | Developer Zone | Subscribe | Updated