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

How to determine amount of unused ram in nRF9160

How much ram is my application  + Zephyr + modem firmware using and how much is available in the  nRF9160?    I'm unable to find a memory map and anyway that wouldn't include dynamic allocation.

Thanks

Parents
  • Hello,

    you can find this information in nrf9160_pca10090_partition_conf.dts in the nrf9160 board directory. You application and Zephyr (non-secure image partition) gets allocated 128 KB out of 256. The rest goes to bsdlib and SPM. I don't know why you need to know the RAM allocation for the modem firmware, and I'm not sure if we can share this information with customers, but if you are referring to bsdlib it gets allocated 64 KB.

    Also, I'm not sure if you're asking what amount of RAM is allocated or what is actually being used, because the latter is not easy to determine.

Reply
  • Hello,

    you can find this information in nrf9160_pca10090_partition_conf.dts in the nrf9160 board directory. You application and Zephyr (non-secure image partition) gets allocated 128 KB out of 256. The rest goes to bsdlib and SPM. I don't know why you need to know the RAM allocation for the modem firmware, and I'm not sure if we can share this information with customers, but if you are referring to bsdlib it gets allocated 64 KB.

    Also, I'm not sure if you're asking what amount of RAM is allocated or what is actually being used, because the latter is not easy to determine.

Children
  • File  nrf9160_pca10090_partition_conf.dts has allocations but not the actual amount in use.

    The nrf9160 has 256k ram total. Subtracting the amount of ram used by my application  + Zephyr + modem firmware results in the amount of free ram.  Knowing the amount of free ram is important because my application includes file transfers. Files, of course, can take up a lot of ram. 

  • Modem firmware has it's own separate RAM that you wont be able to write to anyway. If you want  to look at static memory allocation you can look at the zephyr.map file in the build folder.

    Also, when building for nrf9160_pca10090ns you don't have 256k for the application, you have 128k. So you need to subtract amount used by your application from 128k, not 256k.

Related