Content originally posted in LPCWare by cojanprins on Tue Mar 17 04:14:27 MST 2015 I want to add some checking at the heap. I have placed the heap in external SD RAM using linker script (not managed script). I would like lines like:
Content originally posted in LPCWare by cojanprins on Mon Mar 23 06:28:33 MST 2015 OK, thanks for your help, I've implemented it in this way, seems to be working. Kind regards, Cojan.
Content originally posted in LPCWare by lpcxpresso-support on Tue Mar 17 05:31:42 MST 2015 If you are maintaining your own linker scripts, then the simplest approach is probably just to define __top_SDRAM_HEAP in the linker script itself. Just add something along the lines of the following to the top of the script.
__top_SDRAM_HEAP = 0x28000000 + 0x10000;
[Changes addresses to match your system]
The PROVIDE statement you quote should then pick this up and assign the value to the __pvHeapLimit symbol, which is what the heap code in the Redlib C library uses as the end of heap value.