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

nrF5340 Using all RAM on application processor when compiling with zephyr

Hi,

I have an application that needs 256kB of RAM however when I try to compile the code for the application processor it complains that there is only 64kB available. As if the linker doesn't know what is the available size of the RAM


Linking ‘zephyr_prebuilt.elf’
B 1 MB 1.25%
B 64 KB 128.30%
zephyr\zephyr_prebuilt.elf section `bss' will not fit in region `SRAM'
section .intList VMA [20010000,20010037] overlaps section bss VMA [20000000,20013a2a]
region `SRAM' overflowed by 18544 bytes
ld returned 1 exit status
B 2 KB 2.73%
Build failed

I am using segger IDE for nordic and NCS with zephyr. As a starting point I am using the blinky app from the samples directory with the build_nrf5340_dk_nrf5340_cpuapp selected as target board

Can you please advise what do I need to change get access to the entire 512kB of RAM

Thanks

Dusan

Parents
  • Hi Dusan,

    I have the nRF5340-PDK and also tried the blinky app.  I didn't have any problem using 400kB in main.c.   Below is the blinky sample program I used to allocate, fill, and, check the memory.    It looks like we have 448kB to play with, as 64kB is allocated to the secure image.   For memory layout see \ncs\zephyr\boards\arm\nrf5340_dk_nrf5340\nrf5340_dk_nrf5340_cpuapp_partition_conf.dts.   Have you tried a clean install of the tools with ncs v1.2.0?

Reply
  • Hi Dusan,

    I have the nRF5340-PDK and also tried the blinky app.  I didn't have any problem using 400kB in main.c.   Below is the blinky sample program I used to allocate, fill, and, check the memory.    It looks like we have 448kB to play with, as 64kB is allocated to the secure image.   For memory layout see \ncs\zephyr\boards\arm\nrf5340_dk_nrf5340\nrf5340_dk_nrf5340_cpuapp_partition_conf.dts.   Have you tried a clean install of the tools with ncs v1.2.0?

Children
  • Hi,

    Thanks for the info where to find the memory allocation definitions. 

    I had to remove the entire ncs directory, re-download, reconfigure the project and then in worked.

    It seems that something went wrong even though I did a checkout previously. It seems that it needed a fresh download.

    Thanks for your help

    Dusan