mirror of https://github.com/ARMmbed/mbed-os.git
modification to .ld to improve memory
parent
2f4f0b85ac
commit
f44d0fb443
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue