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.
The following figures present a typical flash and RAM layout for an application that uses the OpenThread stack in single and multiprotocol scenarios.
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).
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 and platform.
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 is defined in the following files:
For information about each library variant and features it supports, see the library page.
The following table lists values for the nRF52840 platform.
Role | OpenThread library variant | 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 | Master | cli | yes | 358 | 16 | 80 | 156 | 11 | 530 | 91 |
End Device | Master | cli | yes | 299 | 16 | 72 | 156 | 11 | 471 | 83 |
Router | Optimized | cli | yes | 337 | 16 | 80 | 156 | 11 | 509 | 91 |
End Device | Optimized | cli | yes | 277 | 16 | 71 | 156 | 11 | 449 | 82 |
Router | Master | cli | no | 344 | 16 | 79 | 0 | 0 | 360 | 79 |
End Device | Master | cli | no | 285 | 16 | 70 | 0 | 0 | 301 | 70 |
Router | Optimized | cli | no | 323 | 16 | 78 | 0 | 0 | 339 | 78 |
End Device | Optimized | cli | no | 263 | 16 | 69 | 0 | 0 | 279 | 69 |
The following table lists values for the nRF52833 platform.
Role | OpenThread library variant | 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 | Master | cli | yes | 293 | 8 | 71 | 156 | 11 | 457 | 82 |
End Device | Master | cli | yes | 235 | 8 | 63 | 156 | 11 | 399 | 74 |
Router | Optimized | cli | yes | 273 | 8 | 70 | 156 | 11 | 437 | 81 |
End Device | Optimized | cli | yes | 213 | 8 | 62 | 156 | 11 | 377 | 73 |
Router | Master | cli | no | 280 | 8 | 69 | 0 | 0 | 288 | 69 |
End Device | Master | cli | no | 221 | 8 | 61 | 0 | 0 | 229 | 61 |
Router | Optimized | cli | no | 259 | 8 | 68 | 0 | 0 | 267 | 68 |
End Device | Optimized | cli | no | 199 | 8 | 60 | 0 | 0 | 207 | 60 |
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.
You can adjust the RAM memory requirements, for example to support different number of children, buffers, or registered addresses. The default configuration is defined in the following files:
For information about the library variant and features it supports, see the library page.
Role | OpenThread library variant | App | Flash [KB] (OpenThread stack + app) | Persistent Data [KB] | RAM [KB] (OpenThread stack + app) | Total ROM [KB] | Total RAM [KB] |
---|---|---|---|---|---|---|---|
Radio Co-Processor | Default nRF52811 configuration | rcp | 55 | 0 | 7 | 55 | 7 |