nRF5 SDK for Thread and Zigbee v4.0.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 Secure DFU Bootloader over Serial Link (UART/USB).

thread_mem_resource_map_rom.svg
OpenThread stack ROM layout (nRF52840 and nRF52833)



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 203 16 75 156 11 375 86
End Device cli yes 150 16 67 156 11 322 78
Router cli no 186 16 73 0 0 202 73
End Device cli no 133 16 66 0 0 149 66

Additional options used in this configuration:

DISABLE_BUILTIN_MBEDTLS=1 EXTERNAL_HEAP=1

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 345 16 80 156 11 517 91
End Device cli yes 288 16 72 156 11 460 83
Router cli no 328 16 79 0 0 344 79
End Device cli no 271 16 70 0 0 287 70

Additional options used in this configuration:

BORDER_AGENT=1 BORDER_ROUTER=1 COAP=1 COAPS=1 COMMISSIONER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DISABLE_BUILTIN_MBEDTLS=1 DNS_CLIENT=1 DIAGNOSTIC=1 ECDSA=1 EXTERNAL_HEAP=1 JOINER=1 LINK_RAW=1 MAC_FILTER=1 MTD_NETDIAG=1 SERVICE=1 SNTP_CLIENT=1 UDP_FORWARD=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 330 16 80 156 11 502 91
End Device cli yes 273 16 72 156 11 445 83
Router cli no 313 16 78 0 0 329 78
End Device cli no 256 16 70 0 0 272 70

Additional options used in this configuration:

BORDER_ROUTER=1 COAP=1 COAPS=1 COMMISSIONER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DISABLE_BUILTIN_MBEDTLS=1 DNS_CLIENT=1 EXTERNAL_HEAP=1 JOINER=1 MTD_NETDIAG=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 317 16 79 156 11 489 90
End Device cli yes 265 16 71 156 11 437 82
Router cli no 300 16 77 0 0 316 77
End Device cli no 248 16 69 0 0 264 69

Additional options used in this configuration:

COAP=1 COAPS=1 DHCP6_CLIENT=1 DISABLE_BUILTIN_MBEDTLS=1 DNS_CLIENT=1 EXTERNAL_HEAP=1 JOINER=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 323 16 79 156 11 495 90
End Device cli yes 274 16 72 156 11 446 83
Router cli no 306 16 78 0 0 322 78
End Device cli no 256 16 70 0 0 272 70

Additional options used in this configuration:

BORDER_AGENT=1 BORDER_ROUTER=1 COAP=1 COAPS=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DISABLE_BUILTIN_MBEDTLS=1 EXTERNAL_HEAP=1 JOINER=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 51 8 7 59 7

Additional options used in this configuration:

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

Documentation feedback | Developer Zone | Subscribe | Updated