Skip to content

Commit 6e0fceb

Browse files
authored
Merge pull request #9588 from naveenkaje/support_disco
DISCO L475VG IOT01A: heap in SRAM2 region
2 parents 3d4582b + 837e86d commit 6e0fceb

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

features/FEATURE_BOOTLOADER/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/mbed_lib.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "bootloader_DISCO_L475VG_IOT01A",
33
"target_overrides": {
44
"*": {
5-
"target.app_offset": "0x9800",
6-
"target.header_offset": "0x9000",
5+
"target.app_offset": "0x10400",
6+
"target.header_offset": "0x10000",
77
"target.bootloader_img": "mbed-bootloader-internal_dfb7cc.bin"
88
}
99
}

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/device/TOOLCHAIN_ARM_STD/stm32l475xx.sct

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
6060
RW_m_crash_data MBED_CRASH_REPORT_RAM_START EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data
6161
}
6262
RW_IRAM1 MBED_RAM0_START MBED_RAM0_SIZE-Stack_Size { ; RW data 96k L4-SRAM1
63-
.ANY (+RW +ZI)
63+
.ANY (+RW, +Last)
6464
}
6565
; Total: 98 vectors = 392 bytes (0x188) to be reserved in RAM
66-
RW_IRAM2 (0x10000000+0x188) (0x08000-0x188) { ; RW data 32k L4-ECC-SRAM2 retained in standby
67-
.ANY (+RW +ZI)
66+
RW_IRAM2 (0x10000000+0x188) (0x08000-0x188) { ; ZI data 32k L4-ECC-SRAM2
67+
.ANY (+ZI)
6868
}
6969
ARM_LIB_STACK (MBED_RAM0_START+MBED_RAM0_SIZE) EMPTY -Stack_Size { ; stack
7070
}

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/device/TOOLCHAIN_GCC_ARM/STM32L475XX.ld

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ SECTIONS
152152
. = ALIGN(8);
153153
__bss_end__ = .;
154154
_ebss = .;
155-
} > SRAM1
155+
} > SRAM2
156156

157157
.heap (COPY):
158158
{
@@ -183,5 +183,6 @@ SECTIONS
183183
PROVIDE(__stack = __StackTop);
184184
/* Check if stack exceeds RAM2 limit */
185185
ASSERT((ORIGIN(SRAM2)+LENGTH(SRAM2)) >= __StackLimit, "SRAM2 overflow")
186-
186+
/* Check if bss exceeds __StackLimit */
187+
ASSERT(__bss_end__ <= __StackLimit, "BSS is too big for RAM2")
187188
}

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/device/TOOLCHAIN_IAR/stm32l475xx.icf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
3333
}
3434

3535
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
36-
define symbol __size_heap__ = 0x10000;
36+
define symbol __size_heap__ = 0x17000;
3737
define block CSTACK with alignment = 8, size = __size_cstack__ { };
3838
define block HEAP with alignment = 8, size = __size_heap__ { };
3939

@@ -44,4 +44,4 @@ place at address mem:__intvec_start__ { readonly section .intvec };
4444

4545
place in ROM_region { readonly };
4646
place in SRAM1_region { readwrite, block HEAP };
47-
place in SRAM2_region { block CSTACK };
47+
place in SRAM2_region { first block CSTACK, zeroinit };

0 commit comments

Comments
 (0)