mirror of https://github.com/ARMmbed/mbed-os.git
[Maxim] Support boot stack size configuration option
parent
08004e141d
commit
6d1d08b660
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
#! armcc -E
|
||||
; MAX32600
|
||||
; 256KB FLASH (0x40000) @ 0x000000000
|
||||
; 2KB RAM (0x8000) @ 0x20000000
|
||||
|
|
@ -6,6 +6,12 @@
|
|||
|
||||
; MAX32600: 256KB FLASH (0x40000) + 32KB RAM (0x8000)
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x800
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
LR_IROM1 0x00000000 0x40000 { ; load region size_region
|
||||
ER_IROM1 0x00000000 0x40000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
|
|
@ -14,8 +20,9 @@ LR_IROM1 0x00000000 0x40000 { ; load region size_region
|
|||
}
|
||||
|
||||
; [RAM] Vector table dynamic copy: 79 vectors * 4 bytes = (0x140) - alignment
|
||||
RW_IRAM1 (0x20000000+0x140) (0x8000-0x140) { ; RW data
|
||||
RW_IRAM1 (0x20000000+0x140) (0x8000-0x140-Stack_Size) { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
ARM_LIB_STACK (0x20000000+0x8000) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
}
|
||||
|
|
@ -37,6 +37,12 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 /* start from 0x0, fullsize flash, 256k */
|
||||
|
|
@ -174,7 +180,7 @@ SECTIONS
|
|||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
|
||||
/* Stack and Heap */
|
||||
define symbol __size_cstack__ = 0x0800;
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
define symbol __size_heap__ = 0x3000;
|
||||
define block CSTACK with alignment = 8, size = __size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __size_heap__ { };
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
#! armcc -E
|
||||
; MAX32610
|
||||
; 256KB FLASH (0x40000) @ 0x000000000
|
||||
; 2KB RAM (0x8000) @ 0x20000000
|
||||
|
|
@ -6,6 +6,12 @@
|
|||
|
||||
; MAX32610: 256KB FLASH (0x40000) + 32KB RAM (0x8000)
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x800
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
LR_IROM1 0x00000000 0x40000 { ; load region size_region
|
||||
ER_IROM1 0x00000000 0x40000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
|
|
@ -14,8 +20,9 @@ LR_IROM1 0x00000000 0x40000 { ; load region size_region
|
|||
}
|
||||
|
||||
; [RAM] Vector table dynamic copy: 79 vectors * 4 bytes = (0x140) - alignment
|
||||
RW_IRAM1 (0x20000000+0x140) (0x8000-0x140) { ; RW data
|
||||
RW_IRAM1 (0x20000000+0x140) (0x8000-0x140-Stack_Size) { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
ARM_LIB_STACK (0x20000000+0x8000) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
}
|
||||
|
|
@ -37,6 +37,12 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000 /* start from 0x0, fullsize flash, 256k */
|
||||
|
|
@ -174,7 +180,7 @@ SECTIONS
|
|||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,11 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
|
||||
/* Stack and Heap */
|
||||
define symbol __size_cstack__ = 0x0800;
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
|
||||
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
define symbol __size_heap__ = 0x3000;
|
||||
define block CSTACK with alignment = 8, size = __size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __size_heap__ { };
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#! armcc -E
|
||||
; MAX32620
|
||||
; 2MB FLASH (0x200000) @ 0x000000000
|
||||
; 256KB RAM (0x40000) @ 0x20000000
|
||||
|
|
@ -6,6 +7,12 @@
|
|||
|
||||
; MAX32620: 2MB FLASH (0x200000) + 256KB RAM (0x40000)
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x800
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
LR_IROM1 0x00000000 0x200000 { ; load region size_region
|
||||
ER_IROM1 0x00000000 0x200000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
|
|
@ -15,8 +22,9 @@ LR_IROM1 0x00000000 0x200000 { ; load region size_region
|
|||
|
||||
; [RAM] Vector table dynamic copy: 65 vectors * 4 bytes = 260 (0x104) + 4
|
||||
; for 8 byte alignment
|
||||
RW_IRAM1 (0x20000000+0x108) (0x40000-0x108) { ; RW data
|
||||
RW_IRAM1 (0x20000000+0x108) (0x40000-0x108-Stack_Size) { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
ARM_LIB_STACK (0x20000000+0x40000) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 2M
|
||||
|
|
@ -168,7 +174,7 @@ SECTIONS
|
|||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,11 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
|
||||
/* Stack and Heap */
|
||||
define symbol __size_cstack__ = 0x1000;
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
|
||||
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
define symbol __size_heap__ = 0x4000;
|
||||
define block CSTACK with alignment = 8, size = __size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __size_heap__ { };
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#! armcc -E
|
||||
; MAX32620
|
||||
; 2MB FLASH (0x200000) @ 0x000000000
|
||||
; 256KB RAM (0x40000) @ 0x20000000
|
||||
|
|
@ -6,6 +7,12 @@
|
|||
|
||||
; MAX32620: 2MB FLASH (0x200000) + 256KB RAM (0x40000)
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x800
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
LR_IROM1 0x00000000 0x200000 { ; load region size_region
|
||||
ER_IROM1 0x00000000 0x200000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
|
|
@ -15,8 +22,9 @@ LR_IROM1 0x00000000 0x200000 { ; load region size_region
|
|||
|
||||
; [RAM] Vector table dynamic copy: 65 vectors * 4 bytes = 260 (0x104) + 4
|
||||
; for 8 byte alignment
|
||||
RW_IRAM1 (0x20000000+0x108) (0x40000-0x108) { ; RW data
|
||||
RW_IRAM1 (0x20000000+0x108) (0x40000-0x108-Stack_Size) { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
ARM_LIB_STACK (0x20000000+0x40000) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 2M
|
||||
|
|
@ -168,7 +174,7 @@ SECTIONS
|
|||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,11 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
|
||||
/* Stack and Heap */
|
||||
define symbol __size_cstack__ = 0x1000;
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
|
||||
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
define symbol __size_heap__ = 0x4000;
|
||||
define block CSTACK with alignment = 8, size = __size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __size_heap__ { };
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
#! armcc -E
|
||||
; MAX32625
|
||||
; 512KB FLASH (0x70000) @ 0x000010000
|
||||
; 160KB RAM (0x24F00) @ 0x20003100
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x800
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
LR_IROM1 0x000010000 0x70000 { ; load region size_region
|
||||
ER_IROM1 0x000010000 0x70000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
|
|
@ -10,7 +17,9 @@ LR_IROM1 0x000010000 0x70000 { ; load region size_region
|
|||
}
|
||||
|
||||
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
|
||||
RW_IRAM1 (0x20003100+0x110) (0x24F00-0x110) { ; RW data
|
||||
RW_IRAM1 (0x20003100+0x110) (0x24F00-0x110-Stack_Size) { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
ARM_LIB_STACK (0x20003100+0x24F00) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@
|
|||
#define MBED_APP_SIZE 0x00070000
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x800
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
||||
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
|
|
@ -19,7 +25,9 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
|
|||
}
|
||||
|
||||
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
|
||||
RW_IRAM1 (0x20000000+0x110) (0x28000-0x110) { ; RW data
|
||||
RW_IRAM1 (0x20000000+0x110) (0x28000-0x110-Stack_Size) { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
ARM_LIB_STACK (0x20000000+0x28000) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
#! armcc -E
|
||||
; MAX32625
|
||||
; 512KB FLASH (0x80000) @ 0x000000000
|
||||
; 160KB RAM (0x28000) @ 0x20000000
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x800
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
LR_IROM1 0x000000000 0x80000 { ; load region size_region
|
||||
ER_IROM1 0x000000000 0x80000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
|
|
@ -10,7 +17,9 @@ LR_IROM1 0x000000000 0x80000 { ; load region size_region
|
|||
}
|
||||
|
||||
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
|
||||
RW_IRAM1 (0x20000000+0x110) (0x28000-0x110) { ; RW data
|
||||
RW_IRAM1 (0x20000000+0x110) (0x28000-0x110-Stack_Size) { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
ARM_LIB_STACK (0x20000000+0x28000) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00010000, LENGTH = 0x00070000
|
||||
|
|
@ -168,7 +174,7 @@ SECTIONS
|
|||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@
|
|||
#define MBED_APP_SIZE 0x00070000
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||
|
|
@ -176,7 +182,7 @@ SECTIONS
|
|||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
|
||||
|
|
@ -168,7 +174,7 @@ SECTIONS
|
|||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
|
||||
/* Stack and Heap */
|
||||
define symbol __size_cstack__ = 0x5000;
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
define symbol __size_heap__ = 0xA000;
|
||||
define block CSTACK with alignment = 8, size = __size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __size_heap__ { };
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
|
||||
/* Stack and Heap */
|
||||
define symbol __size_cstack__ = 0x5000;
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
|
||||
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
define symbol __size_heap__ = 0xA000;
|
||||
define block CSTACK with alignment = 8, size = __size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __size_heap__ { };
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
|
||||
/* Stack and Heap */
|
||||
define symbol __size_cstack__ = 0x5000;
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
define symbol __size_heap__ = 0xA000;
|
||||
define block CSTACK with alignment = 8, size = __size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __size_heap__ { };
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
#! armcc -E
|
||||
; MAX3263x
|
||||
; 2MB FLASH (0x200000) @ 0x000000000
|
||||
; 512KB RAM (0x80000) @ 0x20000000
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x800
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
LR_IROM1 0x000000000 0x200000 { ; load region size_region
|
||||
ER_IROM1 0x000000000 0x200000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
|
|
@ -10,7 +17,9 @@ LR_IROM1 0x000000000 0x200000 { ; load region size_region
|
|||
}
|
||||
|
||||
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
|
||||
RW_IRAM1 (0x20000000+0x110) (0x80000-0x110) { ; RW data
|
||||
RW_IRAM1 (0x20000000+0x110) (0x80000-0x110-Stack_Size) { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
ARM_LIB_STACK (0x20000000+0x80000) EMPTY -Stack_Size { ; stack
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00200000
|
||||
|
|
@ -168,7 +174,7 @@ SECTIONS
|
|||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM
|
|||
define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
|
||||
|
||||
/* Stack and Heap */
|
||||
define symbol __size_cstack__ = 0x5000;
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
define symbol __size_heap__ = 0xA000;
|
||||
define block CSTACK with alignment = 8, size = __size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __size_heap__ { };
|
||||
|
|
|
|||
Loading…
Reference in New Issue