Increasing RAM for application in 9161

The 9161 has 256 KB of RAM, but while building the application, it reports that only 32 KB is available for the application. If I create some large static buffers (e.g. 40 KB), the build fails with linker errors saying that I've overflown the available memory. Apparently I'm on dynamic partitions and it's not clear how I can increase the available memory for my non-secure application. I can't malloc this buffer either, same error. How do I increase the available RAM for my application?

Parents
  • Hi,

     

    A typical layout for a nRF91-device is that you have (atleast) one secure and one non-secure RAM block:

      flash_primary (0x100000 - 1024kB): 
    +-------------------------------------------+
    +---0x0: tfm_secure (0x8000 - 32kB)---------+
    | 0x0: tfm (0x8000 - 32kB)                  |
    +---0x8000: tfm_nonsecure (0xf8000 - 992kB)-+
    | 0x8000: app (0xf8000 - 992kB)             |
    +-------------------------------------------+
    
      otp (0x2f4 - 756B): 
    +------------------------------+
    | 0xff8108: otp (0x2f4 - 756B) |
    +------------------------------+
    
      sram_primary (0x40000 - 256kB): 
    +--------------------------------------------------+
    +---0x20000000: sram_secure (0x8000 - 32kB)--------+
    | 0x20000000: tfm_sram (0x8000 - 32kB)             |
    +---0x20008000: sram_nonsecure (0x38000 - 224kB)---+
    +---0x20008000: nrf_modem_lib_sram (0x4568 - 17kB)-+
    | 0x20008000: nrf_modem_lib_ctrl (0x4e8 - 1kB)     |
    | 0x200084e8: nrf_modem_lib_tx (0x2080 - 8kB)      |
    | 0x2000a568: nrf_modem_lib_rx (0x2000 - 8kB)      |
    +--------------------------------------------------+
    | 0x2000c568: sram_primary (0x33a98 - 206kB)       |
    +--------------------------------------------------+
    

     

    Here I just took the at_client as-is, and checked the overall partition layout.

    The TFM-image is usually 32k, and the remainder is for the application space.

     

    Could you share the full build output?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    A typical layout for a nRF91-device is that you have (atleast) one secure and one non-secure RAM block:

      flash_primary (0x100000 - 1024kB): 
    +-------------------------------------------+
    +---0x0: tfm_secure (0x8000 - 32kB)---------+
    | 0x0: tfm (0x8000 - 32kB)                  |
    +---0x8000: tfm_nonsecure (0xf8000 - 992kB)-+
    | 0x8000: app (0xf8000 - 992kB)             |
    +-------------------------------------------+
    
      otp (0x2f4 - 756B): 
    +------------------------------+
    | 0xff8108: otp (0x2f4 - 756B) |
    +------------------------------+
    
      sram_primary (0x40000 - 256kB): 
    +--------------------------------------------------+
    +---0x20000000: sram_secure (0x8000 - 32kB)--------+
    | 0x20000000: tfm_sram (0x8000 - 32kB)             |
    +---0x20008000: sram_nonsecure (0x38000 - 224kB)---+
    +---0x20008000: nrf_modem_lib_sram (0x4568 - 17kB)-+
    | 0x20008000: nrf_modem_lib_ctrl (0x4e8 - 1kB)     |
    | 0x200084e8: nrf_modem_lib_tx (0x2080 - 8kB)      |
    | 0x2000a568: nrf_modem_lib_rx (0x2000 - 8kB)      |
    +--------------------------------------------------+
    | 0x2000c568: sram_primary (0x33a98 - 206kB)       |
    +--------------------------------------------------+
    

     

    Here I just took the at_client as-is, and checked the overall partition layout.

    The TFM-image is usually 32k, and the remainder is for the application space.

     

    Could you share the full build output?

     

    Kind regards,

    Håkon

Children
No Data
Related