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

NRF51 removing the HEAP

I would like to remove the HEAP in my app to free up RAM.

  • I removed all explict calls to malloc and family.
  • I removed all variable length arrays, after finding that they generated calls to malloc.
  • I set Heap_Size EQU 0; in arm_startup_nrf51.s

Are there any other steps to take? Any "gotcha's"? How do I ensure the compiler can't generate code that relies on a heap?

Do I need to change or remove the AREA HEAP ... section of the startup file?

Related