modification to .ld to improve memory

pull/5355/head
Roberto Spelta 2017-09-13 16:12:17 +02:00 committed by adbridge
parent 2f4f0b85ac
commit f44d0fb443
1 changed files with 10 additions and 2 deletions

View File

@ -6,6 +6,9 @@
#define MBED_APP_SIZE 1024k
#endif
STACK_SIZE = 0x400;
HEAP_SIZE = 0x7800;
/* Linker script to configure memory regions. */
MEMORY
{
@ -86,6 +89,11 @@ SECTIONS
__etext = .;
_sidata = .;
.mesh_heap (COPY):
{
*(mesh_heap*)
} > SRAM2
.data : AT (__etext)
{
__data_start__ = .;
@ -138,7 +146,7 @@ SECTIONS
{
__end__ = .;
end = __end__;
*(.heap*)
. += HEAP_SIZE;
__HeapLimit = .;
} > SRAM1
@ -154,7 +162,7 @@ SECTIONS
* size of stack_dummy section */
__StackTop = ORIGIN(SRAM1) + LENGTH(SRAM1);
_estack = __StackTop;
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
__StackLimit = __StackTop - STACK_SIZE;
PROVIDE(__stack = __StackTop);
/* Check if data + heap + stack exceeds RAM limit */