This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF connect SDK size for nRF9160

Hi team,

Do we have any evaluation on the nRF Connect SDK size if customer wants to run on nRF9160? Customer wants to evaluate their Flash/ RAM buffer for APP.

Thanks!

Leon

Parents
  • I'll just copy in some replies I have given earlier (in a private ticket) about the flash size of the different libraries in the nRF Connect SDK. It was written based on NCS v1.0.0 I believe, but the sizes should be roughly the same I think.


    Sample/application Calculation of memory Total flash memory
    at_client 32 768 (SPM)‬ + 109650 bytes (application) 142 418‬ bytes
    aws_fota 35408 (SPM) +  49152 (mcuboot) + 152668 bytes (application) 237 228 bytes
    coap_client 32768 (SPM) + 101944 bytes (application) 134 712‬ bytes
    gps 32768 (SPM) + 114256 bytes (application) 147 024‬ bytes
    lte_ble_gateway 32768 (SPM) + 198191 bytes (application) 230 959 bytes
    lwm2m_carrier 32768 (SPM) + 160400 bytes (application) 193 168‬ bytes
    mqtt_simple 32768 (SPM) + 103800 bytes (application) 136 568‬‬ bytes
    asset_tracker 35408 (SPM) + 49152 (mcuboot) + 211232 bytes (application) 295 792‬ bytes
    Non-secure hello world 32768 (SPM) + 11712 bytes 44 480‬ bytes
    Secure hello world 14292 bytes 14292 bytes

    You can use this table to get a rough estimate of how much flash is required for different cellular applications. By comparing the flash usage of a particular sample with the flash usage of the non-secure hello world example, you can see how much additional flash is required (not including SPM, Zephyr kernel etc..).

    E.g. in order to set up a simple MQTT application, you need roughly 92 088‬ bytes:

    • 136 568 bytes (flash usage of mqtt_simple) - 44 480‬ bytes (flash usage of non-secure hello world) = 92 088‬ bytes

    This means that all the additional libraries/files (drivers/lte_link_control, BSD libraryMQTT, etc.. ) required for an MQTT application occupy roughly 92088 bytes of memory. 

Reply
  • I'll just copy in some replies I have given earlier (in a private ticket) about the flash size of the different libraries in the nRF Connect SDK. It was written based on NCS v1.0.0 I believe, but the sizes should be roughly the same I think.


    Sample/application Calculation of memory Total flash memory
    at_client 32 768 (SPM)‬ + 109650 bytes (application) 142 418‬ bytes
    aws_fota 35408 (SPM) +  49152 (mcuboot) + 152668 bytes (application) 237 228 bytes
    coap_client 32768 (SPM) + 101944 bytes (application) 134 712‬ bytes
    gps 32768 (SPM) + 114256 bytes (application) 147 024‬ bytes
    lte_ble_gateway 32768 (SPM) + 198191 bytes (application) 230 959 bytes
    lwm2m_carrier 32768 (SPM) + 160400 bytes (application) 193 168‬ bytes
    mqtt_simple 32768 (SPM) + 103800 bytes (application) 136 568‬‬ bytes
    asset_tracker 35408 (SPM) + 49152 (mcuboot) + 211232 bytes (application) 295 792‬ bytes
    Non-secure hello world 32768 (SPM) + 11712 bytes 44 480‬ bytes
    Secure hello world 14292 bytes 14292 bytes

    You can use this table to get a rough estimate of how much flash is required for different cellular applications. By comparing the flash usage of a particular sample with the flash usage of the non-secure hello world example, you can see how much additional flash is required (not including SPM, Zephyr kernel etc..).

    E.g. in order to set up a simple MQTT application, you need roughly 92 088‬ bytes:

    • 136 568 bytes (flash usage of mqtt_simple) - 44 480‬ bytes (flash usage of non-secure hello world) = 92 088‬ bytes

    This means that all the additional libraries/files (drivers/lte_link_control, BSD libraryMQTT, etc.. ) required for an MQTT application occupy roughly 92088 bytes of memory. 

Children
  • Here are some different approaches to calculate the size of a library in NCS:


    • Easy way:
      • Just simply create your application, with the functions and libraries needed and use the Programmer app to see how much flash is used, and how much is left. 
      • With this method, you don't know how much flash each library occupies, but you know how much memory everything uses and how much you have left. This may be sufficient in many circumstances.
    • More complicated ways which give more information:
      • Use the executable arm-none-eabi-objdump (located in C:\gnuarmemb\bin)
        • Build the project
        • Look in the build/zephyr folder and find the .a file for a particular library
        • Type in arm-none-eabi-objdump -h <library>.a
        • Add together the size of all the .text fields
        • This approach does not give information about the size of all the underlying libraries the particular library uses
      • Use SES Nordic Edition
        • Open and build the project
        • Look for the specific library in the Project Explorer window and look at the value under "code"
        • This approach does not give information about the size of all the underlying libraries the particular library uses
      • Subtract method:
        • Build a really basic application without any functionality (only the zephyr kernel and some basic logging)
        • Then build the mqtt_simple application using the same configurations (e.g. optimization level, logging, etc..).
        • subtract the size of the mqtt simple application from the size of the basic application.
        • This approach will give information about the size of all the underlying libraries the particular library uses
        • However, be aware that these dependencies may be used by other libraries as well, and you can't do the same with e.g. the CoAP library and add the size to the size of the mqtt library (Have to subtract the size of the underlying libraries which both uses).

    Best regards,

    Simon

Related