[TOSHIBA] Support boot stack size configuration option

pull/9092/head
Przemyslaw Stekiel 2018-12-18 08:56:47 +01:00
parent d30a14e64f
commit 9fe7e360b3
15 changed files with 109 additions and 17 deletions

View File

@ -1,3 +1,5 @@
#! armcc -E
;; TMPM066FWUG scatter file
;; Vector table starts at 0
@ -13,6 +15,12 @@
;; Compatible with ISSM model
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
#define Stack_Size MBED_BOOT_STACK_SIZE
LR_IROM1 0x00000000 0x20000
{
ER_IROM1 0x00000000 0x20000
@ -25,8 +33,11 @@ LR_IROM1 0x00000000 0x20000
}
/* 8_byte_aligned(32 + 16 vect * 4 bytes) = 8_byte_aligned(0xC0) */
RW_IRAM1 0x200000C0 (0x4000 - 0xC0)
RW_IRAM1 0x200000C0 (0x4000 - 0xC0 - Stack_Size)
{
.ANY (+RW, +ZI)
}
ARM_LIB_STACK (0x200000C0+0x4000) EMPTY -Stack_Size { ; stack
}
}

View File

@ -1,5 +1,11 @@
/* Linker script for Toshiba TMPM066 */
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
STACK_SIZE = MBED_BOOT_STACK_SIZE;
/* Linker script to configure memory regions. */
MEMORY
{
@ -142,7 +148,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 */

View File

@ -9,7 +9,10 @@ define symbol __ICFEDIT_region_ROM_end__ = 0x0001FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
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__ = 0xC00;
/**** End of ICF editor section. ###ICF###*/

View File

@ -1,3 +1,5 @@
#! armcc -E
;; TMPM3H6FWFG scatter file
;; Vector table starts at 0
@ -13,6 +15,12 @@
;; Compatible with ISSM model
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
#define Stack_Size MBED_BOOT_STACK_SIZE
LR_IROM1 0x00000000 0x20000
{
ER_IROM1 0x00000000 0x20000
@ -22,8 +30,11 @@ LR_IROM1 0x00000000 0x20000
.ANY (+RO)
}
; 8_byte_aligned(117 + 16 vect * 4 bytes) = 8_byte_aligned(0x214) = 0x218
RW_IRAM1 (0x20000000 + 0x218) (0x4000 - 0x218)
RW_IRAM1 (0x20000000 + 0x218) (0x4000 - 0x218 - Stack_Size)
{
.ANY (+RW, +ZI)
}
ARM_LIB_STACK (0x20000000+0x4000) EMPTY -Stack_Size { ; stack
}
}

View File

@ -1,5 +1,11 @@
/* Linker script for Toshiba TMPM3H6 */
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
STACK_SIZE = MBED_BOOT_STACK_SIZE;
/* Linker script to configure memory regions. */
MEMORY
{
@ -154,7 +160,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 */

View File

@ -9,7 +9,10 @@ define symbol __ICFEDIT_region_ROM_end__ = 0x0001FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000218; /* 8_byte_aligned(117 + 16 vect * 4 bytes) */
define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
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__ = 0xC00;
/**** End of ICF editor section. ###ICF###*/

View File

@ -23,6 +23,12 @@
#define MBED_APP_SIZE 0x00080000
#endif
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
#define Stack_Size MBED_BOOT_STACK_SIZE
LR_IROM1 MBED_APP_START MBED_APP_SIZE
{
ER_IROM1 MBED_APP_START MBED_APP_SIZE
@ -32,8 +38,11 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE
.ANY (+RO)
}
RW_IRAM1 0x200002D8 (0x10000 - 0x2D8)
RW_IRAM1 0x200002D8 (0x10000 - 0x2D8 - Stack_Size)
{
.ANY (+RW, +ZI)
}
ARM_LIB_STACK (0x200002D8+0x10000) EMPTY -Stack_Size { ; stack
}
}

View File

@ -8,6 +8,12 @@
#define MBED_APP_SIZE 512K
#endif
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
STACK_SIZE = MBED_BOOT_STACK_SIZE;
/* Linker script to configure memory regions. */
MEMORY
{
@ -162,7 +168,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 */

View File

@ -13,7 +13,10 @@ define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
define symbol __ICFEDIT_region_RAM_start__ = 0x200002D8;
define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF;
/*Heap 1/4 of ram and stack 1/8*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
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__ = 0x2000;
/**** End of ICF editor section. ###ICF###*/

View File

@ -22,6 +22,12 @@
#define MBED_APP_SIZE 0x100000
#endif
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
#define Stack_Size MBED_BOOT_STACK_SIZE
; TMPM46B: 1024 KB FLASH (0x100000) + 512 KB SRAM (0x80000)
LR_IROM1 MBED_APP_START MBED_APP_SIZE ; load region size_region
@ -33,9 +39,12 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE ; load region size_region
.ANY (+RO)
}
RW_IRAM1 0x200001E0 (0x80000 - 0x1E0)
RW_IRAM1 0x200001E0 (0x80000 - 0x1E0 - Stack_Size)
{
tmpm46b_fc.o(+RO)
.ANY (+RW, +ZI)
}
ARM_LIB_STACK (0x200001E0+0x80000) EMPTY -Stack_Size { ; stack
}
}

View File

@ -1,5 +1,11 @@
/* Linker script for Toshiba TMPM46B */
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
STACK_SIZE = MBED_BOOT_STACK_SIZE;
/* Linker script to configure memory regions. */
#if !defined(MBED_APP_START)
@ -199,7 +205,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 */

View File

@ -13,8 +13,10 @@ define symbol __ICFEDIT_region_RAM_end__ = 0x2006FFFF;
define symbol __ICFEDIT_region_BRAM_start__ = 0x20070000;
define symbol __ICFEDIT_region_BRAM_end__ = 0x200807FF;
/*-Sizes-*/
/*Heap 1/4 of ram and stack 1/8*/
define symbol __ICFEDIT_size_cstack__ = 0x10000;
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__ = 0x20000;
/**** End of ICF editor section. ###ICF###*/

View File

@ -22,6 +22,12 @@
#define MBED_APP_SIZE 0x000180000
#endif
#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif
#define Stack_Size MBED_BOOT_STACK_SIZE
; TMPM4G9: 1536 KB FLASH (0x180000) + 192 KB SRAM (0x30000)
LR_IROM1 MBED_APP_START MBED_APP_SIZE ; load region size_region
@ -33,9 +39,12 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE ; load region size_region
.ANY (+RO)
}
RW_IRAM1 0x20000320 (0x30000 - 0x320)
RW_IRAM1 0x20000320 (0x30000 - 0x320 - Stack_Size)
{
tmpm4g9_fc.o (+RO)
.ANY (+RW, +ZI)
}
ARM_LIB_STACK (0x20000320+0x30000) EMPTY -Stack_Size { ; stack
}
}

View File

@ -10,6 +10,12 @@
#define MBED_APP_SIZE 0x180000
#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
@ -199,7 +205,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 */

View File

@ -13,8 +13,10 @@ define symbol __ICFEDIT_region_RAM_end__ = 0x2002FFFF;
define symbol __ICFEDIT_region_BRAM_start__ = 0x20030000;
define symbol __ICFEDIT_region_BRAM_end__ = 0x200307FF;
/*-Sizes-*/
/*Heap 1/4 of ram and stack 1/8*/
define symbol __ICFEDIT_size_cstack__ = 0x0400;
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__ = 0x6000;
/**** End of ICF editor section. ###ICF###*/