Skip to content

Commit fff888b

Browse files
authored
Merge pull request #11562 from VVESTM/vve_h7_memmap
STM32H7: memory relocation
2 parents 698e75f + 82e89ad commit fff888b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/device/TOOLCHAIN_ARM_STD/startup_stm32h743xx.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
;*
2525
;******************************************************************************
2626

27-
__initial_sp EQU 0x20020000 ; Top of RAM
27+
IMPORT |Image$$ARM_LIB_STACK$$ZI$$Limit|
2828

2929
PRESERVE8
3030
THUMB
@@ -36,7 +36,7 @@ __initial_sp EQU 0x20020000 ; Top of RAM
3636
EXPORT __Vectors_End
3737
EXPORT __Vectors_Size
3838

39-
__Vectors DCD __initial_sp ; Top of Stack
39+
__Vectors DCD |Image$$ARM_LIB_STACK$$ZI$$Limit| ; Top of Stack
4040
DCD Reset_Handler ; Reset Handler
4141
DCD NMI_Handler ; NMI Handler
4242
DCD HardFault_Handler ; Hard Fault Handler

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/device/TOOLCHAIN_ARM_STD/stm32h743xI.sct

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444

4545
#define MBED_RAM_START 0x24000000
4646
#define MBED_RAM_SIZE 0x80000
47-
#define MBED_VECTTABLE_RAM_START (MBED_RAM_START)
47+
#define MBED_VECTTABLE_RAM_START 0x20000000
4848
#define MBED_VECTTABLE_RAM_SIZE 0x298
4949
#define MBED_CRASH_REPORT_RAM_START (MBED_VECTTABLE_RAM_START + MBED_VECTTABLE_RAM_SIZE)
5050
#define MBED_CRASH_REPORT_RAM_SIZE 0x100
51-
#define MBED_RAM0_START (MBED_CRASH_REPORT_RAM_START + MBED_CRASH_REPORT_RAM_SIZE)
52-
#define MBED_RAM0_SIZE (MBED_RAM_SIZE - MBED_VECTTABLE_RAM_SIZE - MBED_CRASH_REPORT_RAM_SIZE)
51+
#define MBED_RAM0_START (MBED_RAM_START)
52+
#define MBED_RAM0_SIZE (MBED_RAM_SIZE)
5353

5454
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
5555

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/device/TOOLCHAIN_GCC_ARM/STM32H743xI.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
1919
MEMORY
2020
{
2121
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
22-
DTCMRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
23-
RAM (xrw) : ORIGIN = 0x24000298, LENGTH = 512K - 0x298 /* end = 0x24080000 */
22+
DTCMRAM (rwx) : ORIGIN = 0x20000298, LENGTH = 128K-0x298
23+
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
2424
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
2525
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
2626
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
@@ -108,7 +108,7 @@ SECTIONS
108108
. += M_CRASH_DATA_RAM_SIZE;
109109
. = ALIGN(8);
110110
__CRASH_DATA_RAM_END__ = .; /* Define a global symbol at data end */
111-
} > RAM
111+
} > DTCMRAM
112112

113113
.data : AT (__etext)
114114
{

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/device/TOOLCHAIN_IAR/stm32h743xI.icf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ define symbol __region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1;
1010
// 512KB RAM (0x80000)
1111
// Vector table dynamic copy: 166 vectors = 664 bytes (0x298) reserved
1212
// Crash data area: 256 bytes (0x100) reserved
13-
define symbol __NVIC_start__ = 0x24000000;
14-
define symbol __NVIC_end__ = 0x24000297;
15-
define symbol __region_CRASH_DATA_RAM_start__ = 0x24000298; // Aligned on 8 bytes
16-
define symbol __region_CRASH_DATA_RAM_end__ = 0x24000397;
17-
define symbol __region_RAM_start__ = 0x24000398; // Aligned on 8 bytes
13+
define symbol __NVIC_start__ = 0x20000000;
14+
define symbol __NVIC_end__ = 0x20000297;
15+
define symbol __region_CRASH_DATA_RAM_start__ = 0x20000298; // Aligned on 8 bytes
16+
define symbol __region_CRASH_DATA_RAM_end__ = 0x20000397;
17+
define symbol __region_RAM_start__ = 0x24000000; // Aligned on 8 bytes
1818
define symbol __region_RAM_end__ = 0x24000000 + 0x80000 - 1;
1919

2020
// Memory regions

0 commit comments

Comments
 (0)