Skip to content

Commit a5cd64e

Browse files
bcostmadbridge
authored andcommitted
STM32L476/486: change SRAM config for IAR
1 parent de983ce commit a5cd64e

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/device/TOOLCHAIN_IAR/stm32l476xx.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 };

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/device/TOOLCHAIN_IAR/stm32l486xx.icf

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

21-
/* Stack 1/8 and Heap 1/4 of RAM */
22-
define symbol __size_cstack__ = 0x8000;
23-
define symbol __size_heap__ = 0xa000;
21+
/* Stack complete SRAM2 and Heap 2/3 of SRAM1 */
22+
define symbol __size_cstack__ = 0x7e00;
23+
define symbol __size_heap__ = 0x10000;
2424
define block CSTACK with alignment = 8, size = __size_cstack__ { };
2525
define block HEAP with alignment = 8, size = __size_heap__ { };
26-
define block STACKHEAP with fixed order { block HEAP, block CSTACK };
2726

2827
initialize by copy with packing = zeros { readwrite };
2928
do not initialize { section .noinit };
3029

3130
place at address mem:__intvec_start__ { readonly section .intvec };
3231

3332
place in ROM_region { readonly };
34-
place in SRAM1_region { readwrite, block STACKHEAP };
35-
place in SRAM2_region { };
33+
place in SRAM1_region { readwrite, block HEAP };
34+
place in SRAM2_region { block CSTACK };

0 commit comments

Comments
 (0)