mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10616 from ThunderSoft123/master
Fix bug Operator new[] out of memorypull/10654/head
commit
cfb107912b
|
@ -10,6 +10,12 @@
|
||||||
#define MBED_APP_SIZE 0x180000
|
#define MBED_APP_SIZE 0x180000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||||
|
#define MBED_BOOT_STACK_SIZE 0x400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||||
|
@ -185,6 +191,7 @@ SECTIONS
|
||||||
__end__ = .;
|
__end__ = .;
|
||||||
end = __end__;
|
end = __end__;
|
||||||
KEEP(*(.heap*))
|
KEEP(*(.heap*))
|
||||||
|
. = ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;
|
||||||
__HeapLimit = .;
|
__HeapLimit = .;
|
||||||
} > RAM
|
} > RAM
|
||||||
|
|
||||||
|
@ -199,7 +206,7 @@ SECTIONS
|
||||||
/* Set stack top to end of RAM, and stack limit move down by
|
/* Set stack top to end of RAM, and stack limit move down by
|
||||||
* size of stack_dummy section */
|
* size of stack_dummy section */
|
||||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
__StackLimit = __StackTop - STACK_SIZE;
|
||||||
PROVIDE(__stack = __StackTop);
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
/* Check if data + heap + stack exceeds RAM limit */
|
/* Check if data + heap + stack exceeds RAM limit */
|
||||||
|
|
Loading…
Reference in New Issue