[NUCLEO_L476RG, DISCO_L476VG]: GCC_ARM, ARM_STD fix RTOS failed,

INIT_STACK used to compute RTOS main stack inconsistant with sp set at reset
align heap, stack config with IAR
issue: #1845
pull/1846/head
Michel Jaouen 2016-06-03 18:49:54 +02:00
parent f68cdcb695
commit 4e5fe30bc1
8 changed files with 22 additions and 25 deletions

View File

@ -39,7 +39,7 @@
; ;
;******************************************************************************* ;*******************************************************************************
__initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby __initial_sp EQU 0x20018000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
PRESERVE8 PRESERVE8
THUMB THUMB

View File

@ -36,12 +36,11 @@ LR_IROM1 0x08000000 0x100000 { ; load region size_region
.ANY (+RO) .ANY (+RO)
} }
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM RW_IRAM1 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
RW_IRAM1 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
RW_IRAM2 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1 RW_IRAM2 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }

View File

@ -112,7 +112,7 @@ SECTIONS
__data_end__ = .; __data_end__ = .;
_edata = .; _edata = .;
} > SRAM2 } > SRAM1
.bss : .bss :
{ {
@ -124,7 +124,7 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
__bss_end__ = .; __bss_end__ = .;
_ebss = .; _ebss = .;
} > SRAM2 } > SRAM1
.heap (COPY): .heap (COPY):
{ {
@ -132,7 +132,7 @@ SECTIONS
end = __end__; end = __end__;
*(.heap*) *(.heap*)
__HeapLimit = .; __HeapLimit = .;
} > SRAM2 } > SRAM1
/* .stack_dummy section doesn't contains any symbols. It is only /* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign * used for linker to calculate size of stack sections, and assign
@ -144,7 +144,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(SRAM2) + LENGTH(SRAM2); __StackTop = ORIGIN(SRAM1) + LENGTH(SRAM1);
_estack = __StackTop; _estack = __StackTop;
__StackLimit = __StackTop - SIZEOF(.stack_dummy); __StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop); PROVIDE(__stack = __StackTop);

View File

@ -42,7 +42,7 @@
AREA STACK, NOINIT, READWRITE, ALIGN=3 AREA STACK, NOINIT, READWRITE, ALIGN=3
EXPORT __initial_sp EXPORT __initial_sp
__initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby __initial_sp EQU 0x20018000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
; <h> Heap Configuration ; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>

View File

@ -36,12 +36,11 @@ LR_IROM1 0x08000000 0x100000 { ; load region size_region
.ANY (+RO) .ANY (+RO)
} }
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM RW_IRAM1 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
RW_IRAM1 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
RW_IRAM2 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1 RW_IRAM2 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }

View File

@ -39,7 +39,7 @@
; ;
;******************************************************************************* ;*******************************************************************************
__initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby __initial_sp EQU 0x20018000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
PRESERVE8 PRESERVE8
THUMB THUMB

View File

@ -35,13 +35,12 @@ LR_IROM1 0x08000000 0x100000 { ; load region size_region
*(InRoot$$Sections) *(InRoot$$Sections)
.ANY (+RO) .ANY (+RO)
} }
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM RW_IRAM1 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
RW_IRAM1 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
RW_IRAM2 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1 RW_IRAM2 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }

View File

@ -112,7 +112,7 @@ SECTIONS
__data_end__ = .; __data_end__ = .;
_edata = .; _edata = .;
} > SRAM2 } > SRAM1
.bss : .bss :
{ {
@ -124,7 +124,7 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
__bss_end__ = .; __bss_end__ = .;
_ebss = .; _ebss = .;
} > SRAM2 } > SRAM1
.heap (COPY): .heap (COPY):
{ {
@ -132,7 +132,7 @@ SECTIONS
end = __end__; end = __end__;
*(.heap*) *(.heap*)
__HeapLimit = .; __HeapLimit = .;
} > SRAM2 } > SRAM1
/* .stack_dummy section doesn't contains any symbols. It is only /* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign * used for linker to calculate size of stack sections, and assign
@ -140,11 +140,11 @@ SECTIONS
.stack_dummy (COPY): .stack_dummy (COPY):
{ {
*(.stack*) *(.stack*)
} > SRAM2 } > SRAM1
/* 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(SRAM2) + LENGTH(SRAM2); __StackTop = ORIGIN(SRAM1) + LENGTH(SRAM1);
_estack = __StackTop; _estack = __StackTop;
__StackLimit = __StackTop - SIZEOF(.stack_dummy); __StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop); PROVIDE(__stack = __StackTop);