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 Bootloader.
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:
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.
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:
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:
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:
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:
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:
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.
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: