Skip to content

Commit f1cf77f

Browse files
authored
Merge pull request #5844 from adustm/DiscoIot_L475_iarlink
ST-DISCO_L475VG_IOT01A: Improve SRAM use for IAR toolchain
2 parents 11b9a3d + 5104f2d commit f1cf77f

File tree

1 file changed

+5
-6
lines changed
  • targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/device/TOOLCHAIN_IAR

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,17 @@ define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__]
2121
define region SRAM2_region = mem:[from __region_SRAM2_start__ to __region_SRAM2_end__];
2222
define region SRAM1_region = mem:[from __region_SRAM1_start__ to __region_SRAM1_end__];
2323

24-
/* Stack 1/8 and Heap 1/4 of RAM */
25-
define symbol __size_cstack__ = 0x8000;
26-
define symbol __size_heap__ = 0xa000;
24+
/* Stack complete SRAM2 and Heap 2/3 of SRAM1 */
25+
define symbol __size_cstack__ = 0x7e00;
26+
define symbol __size_heap__ = 0x10000;
2727
define block CSTACK with alignment = 8, size = __size_cstack__ { };
2828
define block HEAP with alignment = 8, size = __size_heap__ { };
29-
define block STACKHEAP with fixed order { block HEAP, block CSTACK };
3029

3130
initialize by copy with packing = zeros { readwrite };
3231
do not initialize { section .noinit };
3332

3433
place at address mem:__intvec_start__ { readonly section .intvec };
3534

3635
place in ROM_region { readonly };
37-
place in SRAM1_region { readwrite, block STACKHEAP };
38-
place in SRAM2_region { };
36+
place in SRAM1_region { readwrite, block HEAP };
37+
place in SRAM2_region { block CSTACK };

0 commit comments

Comments
 (0)