mirror of https://github.com/ARMmbed/mbed-os.git
Fixed stack location problem for disco and nucleo boards.
Move main ram to the 32k L4-SRAM2 which is being retained on in standby mode. The additional 96k ram comes second. The new memory layout preserves all vectors and stack in standby modepull/1353/head
parent
d8ad8e8bf5
commit
cef2da3c75
|
@ -52,8 +52,7 @@ Stack_Size EQU 0x00000400
|
|||
|
||||
Stack_Mem SPACE Stack_Size
|
||||
|
||||
;FAIL __initial_sp EQU 0x20020000 ; Top of RAM
|
||||
__initial_sp
|
||||
__initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
|
||||
|
||||
; <h> Heap Configuration
|
||||
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
|
|
|
@ -37,11 +37,11 @@ LR_IROM1 0x08000000 0x100000 { ; load region size_region
|
|||
}
|
||||
|
||||
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
|
||||
RW_IRAM1 (0x20000000+0x188) (0x20000-0x188) { ; RW data
|
||||
RW_IRAM1 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
RW_IRAM2 0x10000000 0x00008000 {
|
||||
RW_IRAM2 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
;
|
||||
;*******************************************************************************
|
||||
|
||||
__initial_sp EQU 0x20020000 ; Top of RAM
|
||||
__initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
|
|
|
@ -37,11 +37,11 @@ LR_IROM1 0x08000000 0x100000 { ; load region size_region
|
|||
}
|
||||
|
||||
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
|
||||
RW_IRAM1 (0x20000000+0x188) (0x20000-0x188) { ; RW data
|
||||
RW_IRAM1 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
RW_IRAM2 0x10000000 0x00008000 {
|
||||
RW_IRAM2 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
||||
RAM (rwx) : ORIGIN = 0x20000188, LENGTH = 128K - 0x188
|
||||
RAM (rwx) : ORIGIN = 0x10000188, LENGTH = 32k - 0x188
|
||||
RAM2 (rwx) : ORIGIN = 0x20000000, LENGTH = 96k
|
||||
}
|
||||
|
||||
/* Linker script to place sections and symbol values. Should be used together
|
||||
|
|
|
@ -3,14 +3,14 @@ define symbol __intvec_start__ = 0x08000000;
|
|||
define symbol __region_ROM_start__ = 0x08000000;
|
||||
define symbol __region_ROM_end__ = 0x080FFFFF;
|
||||
|
||||
/* [RAM = 128kb = 0x20000] */
|
||||
/* [RAM = 96kb + 32kb = 0x20000] */
|
||||
/* Vector table dynamic copy: Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM */
|
||||
define symbol __NVIC_start__ = 0x20000000;
|
||||
define symbol __NVIC_end__ = 0x20000187; /* Aligned on 8 bytes (392 = 49 x 8) */
|
||||
define symbol __region_RAM_start__ = 0x20000188;
|
||||
define symbol __region_RAM_end__ = 0x2001FFFF;
|
||||
define symbol __region_SRAM2_start__ = 0x10000000;
|
||||
define symbol __region_SRAM2_end__ = 0x10007FFF;
|
||||
define symbol __NVIC_start__ = 0x10000000;
|
||||
define symbol __NVIC_end__ = 0x10000187; /* Aligned on 8 bytes (392 = 49 x 8) */
|
||||
define symbol __region_RAM_start__ = 0x10000188;
|
||||
define symbol __region_RAM_end__ = 0x10007FFF;
|
||||
define symbol __region_SRAM2_start__ = 0x20000000;
|
||||
define symbol __region_SRAM2_end__ = 0x20017FFF;
|
||||
|
||||
/* Memory regions */
|
||||
define memory mem with size = 4G;
|
||||
|
@ -32,4 +32,4 @@ place at address mem:__intvec_start__ { readonly section .intvec };
|
|||
|
||||
place in ROM_region { readonly };
|
||||
place in RAM_region { readwrite, block STACKHEAP };
|
||||
place in SRAM2_region { };
|
||||
place in SRAM2_region { };
|
||||
|
|
|
@ -52,8 +52,7 @@ Stack_Size EQU 0x00000400
|
|||
|
||||
Stack_Mem SPACE Stack_Size
|
||||
|
||||
;FAIL __initial_sp EQU 0x20020000 ; Top of RAM
|
||||
__initial_sp
|
||||
__initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
|
||||
|
||||
; <h> Heap Configuration
|
||||
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
|
|
|
@ -37,11 +37,11 @@ LR_IROM1 0x08000000 0x100000 { ; load region size_region
|
|||
}
|
||||
|
||||
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
|
||||
RW_IRAM1 (0x20000000+0x188) (0x20000-0x188) { ; RW data
|
||||
RW_IRAM1 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
RW_IRAM2 0x10000000 0x00008000 {
|
||||
RW_IRAM2 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
;
|
||||
;*******************************************************************************
|
||||
|
||||
__initial_sp EQU 0x20020000 ; Top of RAM
|
||||
__initial_sp EQU 0x10008000 ; Top of RAM, L4-ECC-SRAM2 retained in standby
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
|
|
|
@ -37,11 +37,11 @@ LR_IROM1 0x08000000 0x100000 { ; load region size_region
|
|||
}
|
||||
|
||||
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
|
||||
RW_IRAM1 (0x20000000+0x188) (0x20000-0x188) { ; RW data
|
||||
RW_IRAM1 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
RW_IRAM2 0x10000000 0x00008000 {
|
||||
RW_IRAM2 0x20000000 0x00018000 { ; RW data 96k L4-SRAM1
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
||||
RAM (rwx) : ORIGIN = 0x20000188, LENGTH = 128K - 0x188
|
||||
RAM (rwx) : ORIGIN = 0x10000188, LENGTH = 32k - 0x188
|
||||
RAM2 (rwx) : ORIGIN = 0x20000000, LENGTH = 96k
|
||||
}
|
||||
|
||||
/* Linker script to place sections and symbol values. Should be used together
|
||||
|
|
|
@ -3,14 +3,14 @@ define symbol __intvec_start__ = 0x08000000;
|
|||
define symbol __region_ROM_start__ = 0x08000000;
|
||||
define symbol __region_ROM_end__ = 0x080FFFFF;
|
||||
|
||||
/* [RAM = 128kb = 0x20000] */
|
||||
/* [RAM = 96kb + 32kb = 0x20000] */
|
||||
/* Vector table dynamic copy: Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM */
|
||||
define symbol __NVIC_start__ = 0x20000000;
|
||||
define symbol __NVIC_end__ = 0x20000187; /* Aligned on 8 bytes (392 = 49 x 8) */
|
||||
define symbol __region_RAM_start__ = 0x20000188;
|
||||
define symbol __region_RAM_end__ = 0x2001FFFF;
|
||||
define symbol __region_SRAM2_start__ = 0x10000000;
|
||||
define symbol __region_SRAM2_end__ = 0x10007FFF;
|
||||
define symbol __NVIC_start__ = 0x10000000;
|
||||
define symbol __NVIC_end__ = 0x10000187; /* Aligned on 8 bytes (392 = 49 x 8) */
|
||||
define symbol __region_RAM_start__ = 0x10000188;
|
||||
define symbol __region_RAM_end__ = 0x10007FFF;
|
||||
define symbol __region_SRAM2_start__ = 0x20000000;
|
||||
define symbol __region_SRAM2_end__ = 0x20017FFF;
|
||||
|
||||
/* Memory regions */
|
||||
define memory mem with size = 4G;
|
||||
|
@ -32,4 +32,4 @@ place at address mem:__intvec_start__ { readonly section .intvec };
|
|||
|
||||
place in ROM_region { readonly };
|
||||
place in RAM_region { readwrite, block STACKHEAP };
|
||||
place in SRAM2_region { };
|
||||
place in SRAM2_region { };
|
||||
|
|
Loading…
Reference in New Issue