The max size of RAM and Flash for APP

Hi 

       What is the max size of RAM and Flash for  APP?I looked in the partitions.yml of a sample,I found that there is many region for different use,I don't know which region is necessary and what is the max size of RAM and Flash for  APP?Could you tell me about this?

  • Hi

    Sorry,I still don't know what is the max size  for app in the ram and flash after I have looked the Partion Manager.Becuse of I do not know which region in the yml file is necessary,Besides app,the customer also need fota,that is all the customer need.

  • Hi, 

    You don't need to manage the partitions.yml because it is generated by the partition manager.  

    If you are building a multi-image project, for instance an app + bootloader (mcuboot), which will then partition your flash into bootloader + primary slot + secondary slot.

    Your application image size will effectively be a little under half of the total flash size.

    Here's an example with hello_world + mcuboot, where I go into the build-folder and write "ninja partition_manager_report":

      flash_primary (0x100000 - 1024kB):
    +--------------------------------------------------+
    | 0x0: mcuboot (0x10000 - 64kB)                    |
    +---0x10000: mcuboot_primary (0x78000 - 480kB)-----+
    | 0x10000: mcuboot_pad (0x200 - 512B)              |
    +---0x10200: mcuboot_primary_app (0x77e00 - 479kB)-+
    | 0x10200: spm (0x10000 - 64kB)                    |
    | 0x20200: app (0x67e00 - 415kB)                   |
    +--------------------------------------------------+
    | 0x88000: mcuboot_secondary (0x78000 - 480kB)     |
    +--------------------------------------------------+
    

    Since the application is dual banked, the total size is now 480k for the application space.

    Regards,
    Amanda

  • Hi

    Thank you very much!

    1、By the way,what is the max size for the app use in the ram  ?The figure below shows the content of partitions.yml file in the hello_world ,does the size: 0x2bb18 show the max size for app use in the ram?I use the size of sram_primary minus the sum size of (nrf_modem_lib_ctrl+nrf_modem_lib_rx+nrf_modem_lib_sram+nrf_modem_lib_tx+spm_sram+sram_nonsecure+sram_secure)in the ram,but the result is negative,So I don't know what

     is the max size the app use in the ram.

       

    2、

    The attachment is the partitions.yml file of hello_world I built,there is a app shown in the figure below,Does the app only contain both  primary slot and secondary slot?

    3、Is the space between the address of 0x0 and the address of 0x10000 used by mcuboot?

  • Hi, 

    You can go into the build-folder and write "ninja partition_manager_report" to get the memory layout. That is easy for you to know the partitions.yml. 

    1. Here's memory used by hello_world, where I go into the build-folder and write "ninja partition_manager_report":

      flash_primary (0x100000 - 1024kB):
    +--------------------------------+
    | 0x0: spm (0x10000 - 64kB)      |
    | 0x10000: app (0xf0000 - 960kB) |
    +--------------------------------+
    
      otp (0x2f4 - 756B):
    +------------------------------+
    | 0xff8108: otp (0x2f4 - 756B) |
    +------------------------------+
    
      sram_primary (0x40000 - 256kB):
    +--------------------------------------------------+
    +---0x20000000: sram_secure (0x8000 - 32kB)--------+
    | 0x20000000: spm_sram (0x8000 - 32kB)             |
    +---0x20008000: sram_nonsecure (0x38000 - 224kB)---+
    +---0x20008000: nrf_modem_lib_sram (0x44e8 - 17kB)-+
    | 0x20008000: nrf_modem_lib_ctrl (0x4e8 - 1kB)     |
    | 0x200084e8: nrf_modem_lib_tx (0x2000 - 8kB)      |
    | 0x2000a4e8: nrf_modem_lib_rx (0x2000 - 8kB)      |
    +--------------------------------------------------+
    | 0x2000c4e8: sram_primary (0x33b18 - 206kB)       |
    +--------------------------------------------------+

    Without mcuboot, the total size is 1024k for the application space.

    2. The app is located in flash_primary.

    3. That's spm configurations 

    The partitions.yml provided seem generated by the hello_world without mcuboot. 

    Please see the memory usuaged of hello_world + mcuboot in my previous reply. 

    Amanda

Related