How to Resolve Error: section .heap overlaps absolute placed section .stack

Hello, I am having the following error.
section .heap overlaps absolute placed section .stack

I am wondering if there is a way I can adjust the .heap bounds or .stack bounds to accommodate my program.
When I compile our release code I use only 65% of flash memory but I am using 98.1% of RAM. When I try to compile our debug code with additional logging I get the error.

Also, are there strategies you would recommend to optimize memory within our program?

All the best,

Caleb

Parents Reply Children
  • It's good to hear that my answer was useful to you.

    Unfortunately, it is a bit hard to give general advice on how to optimize RAM usage as it is quite application dependent and usually involves optimizing the code itself. 

    .reserved_ram is the section allocated to the Softdevice. How much RAM the Softdevice needs depends on the configuration settings you have in sdk_config.h. You may be able to free up a few kBs to the application by changing the SD configurations in sdk_config.h here:

     

    Then reduce the app RAM start address here: 

    .bss contains zero initialized global and 'static' variables so reducing this section requires code modification. 

    I can try to look for things to optimize if you are able to share your project here or in a private ticket. 

  • Hi Vidar, I appreciate the explanation. Our memory is working well for us now. If I do need more project specific help I will open up a private ticket.

    All the best

Related