Hello twp,
It should be enough to remove/comment out the heap memory section from .lcf:
//heap: org = 0x40014000, len = 0x00008000 /* 32K heap core_lsm */
and also linker expressions:
//_heap_addr = ADDR(heap);
//_heap_end = ADDR(heap)+SIZEOF(heap);
The linker generates some heap symbols anyway (see the .map file):
_heap_addr 003d7ff0
_heap_end 003d7ff0
but these symbols are equal so the size of heap memory pool is 0. Any attemp to allocate memory using malloc() will not allocate any memory and return 0. You are save and you don't overwrite anything in your SRAM.
Hope it helps.
Stan