mirror of https://github.com/ARMmbed/mbed-os.git
[ONSEMI] Support boot stack size configuration option
parent
3b170118f3
commit
c5a67c9267
|
@ -1,5 +1,11 @@
|
||||||
#! armcc -E
|
#! armcc -E
|
||||||
|
|
||||||
|
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||||
|
#define MBED_BOOT_STACK_SIZE 0x400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||||
|
|
||||||
LR_IROM1 0x00003000 0x0004F000 { ; load region size_region
|
LR_IROM1 0x00003000 0x0004F000 { ; load region size_region
|
||||||
ER_IROM1 0x00003000 0x0004F000 { ; load address = execution address
|
ER_IROM1 0x00003000 0x0004F000 { ; load address = execution address
|
||||||
*.o (RESET, +First)
|
*.o (RESET, +First)
|
||||||
|
@ -11,5 +17,8 @@ LR_IROM1 0x00003000 0x0004F000 { ; load region size_region
|
||||||
RW_IRAM1 0x3FFF4000 + 0x90 { ; 8_byte_aligned(35 vectors * 4 bytes each) = 0x90
|
RW_IRAM1 0x3FFF4000 + 0x90 { ; 8_byte_aligned(35 vectors * 4 bytes each) = 0x90
|
||||||
.ANY(+RW +ZI)
|
.ANY(+RW +ZI)
|
||||||
}
|
}
|
||||||
|
|
||||||
ARM_LIB_HEAP AlignExpr(+0, 8) ALIGN 8 EMPTY (0x3FFF4000 + 0xC000 - AlignExpr(ImageLimit(RW_IRAM1),8) ) {}
|
ARM_LIB_HEAP AlignExpr(+0, 8) ALIGN 8 EMPTY (0x3FFF4000 + 0xC000 - AlignExpr(ImageLimit(RW_IRAM1),8) ) {}
|
||||||
|
ARM_LIB_STACK (0x200000E0+0x00007F20) EMPTY -Stack_Size { ; stack
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
* NCS36510 ARM GCC linker script file
|
* NCS36510 ARM GCC linker script file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||||
|
#define MBED_BOOT_STACK_SIZE 0x400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
FIB (rx) : ORIGIN = 0x00002000, LENGTH = 0x00000800
|
FIB (rx) : ORIGIN = 0x00002000, LENGTH = 0x00000800
|
||||||
TRIM (rx) : ORIGIN = 0x00002800, LENGTH = 0x00000800
|
TRIM (rx) : ORIGIN = 0x00002800, LENGTH = 0x00000800
|
||||||
|
@ -169,12 +175,12 @@ MEMORY {
|
||||||
{
|
{
|
||||||
__StackLimit = .;
|
__StackLimit = .;
|
||||||
*(.stack*);
|
*(.stack*);
|
||||||
. += 0x800 - (. - __StackLimit);
|
. += STACK_SIZE - (. - __StackLimit);
|
||||||
} > RAM
|
} > RAM
|
||||||
|
|
||||||
/* Set stack top to end of RAM */
|
/* Set stack top to end of RAM */
|
||||||
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
|
||||||
__StackLimit = __StackTop - SIZEOF(.stack);
|
__StackLimit = __StackTop - STACK_SIZE;
|
||||||
PROVIDE(__stack = __StackTop);
|
PROVIDE(__stack = __StackTop);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,10 @@ define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
|
||||||
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
|
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
|
||||||
|
|
||||||
/*-Sizes-*/
|
/*-Sizes-*/
|
||||||
define symbol __ICFEDIT_size_cstack__ = 0x200;
|
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||||
|
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||||
|
}
|
||||||
|
define symbol __ICFEDIT_size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||||
define symbol __ICFEDIT_size_heap__ = 0x4000;
|
define symbol __ICFEDIT_size_heap__ = 0x4000;
|
||||||
/**** End of ICF editor section. ###ICF###*/
|
/**** End of ICF editor section. ###ICF###*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue