Skip to content

Commit 891e1f2

Browse files
author
deepikabhavnani
committed
Add Dynamic heap support to IAR
Two new block properties available in linker configuration files: "expanding size" and "minimum size" for IAR 8.11.2 and above Sample: define block HEAP with expanding size, minimum size = 16K, alignment = 8 {}; This block will expand to consume all remaining available space in the range where it is placed. If several such blocks end up in the same range, they will share the remaining space. Cannot place a block with expanding size inside another block with expanding size, inside a block with maximum size, or inside an overlay.
1 parent 8f48104 commit 891e1f2

File tree

109 files changed

+110
-112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+110
-112
lines changed

targets/TARGET_ARM_SSG/TARGET_BEETLE/device/TOOLCHAIN_IAR/BEETLE.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ initialize by copy { readwrite };
4747
do not initialize { section .noinit };
4848

4949
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
50-
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
50+
define block HEAP with expanding size, minimum size = __ICFEDIT_size_heap__, alignment = 8 { };
5151

5252
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
5353
place in ROM_region { readonly };

targets/TARGET_ARM_SSG/TARGET_CM3DS_MPS2/device/TOOLCHAIN_IAR/MPS2.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ initialize by copy { readwrite };
7171
do not initialize { section .noinit };
7272

7373
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
74-
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
74+
define block HEAP with expanding size, minimum size = __ICFEDIT_size_heap__, alignment = 8 { };
7575

7676
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
7777
place in ROM_region { readonly };

targets/TARGET_Freescale/TARGET_K20XX/TARGET_K20D50M/device/TOOLCHAIN_IAR/MK20D5.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_r
3636
define region FlexRAM_region = mem:[from __region_FlexRAM_start__ to __region_FlexRAM_end__];
3737

3838
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
39-
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
39+
define block HEAP with expanding size, minimum size = __ICFEDIT_size_heap__, alignment = 8 { };
4040

4141
define region FlashConfig_region = mem:[from __FlashConfig_start__ to __FlashConfig_end__];
4242

targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/device/TOOLCHAIN_IAR/MKL05Z4.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to (__FlashCon
2929
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__] | mem:[from __region_RAM2_start__ to __region_RAM2_end__];
3030

3131
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
32-
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
32+
define block HEAP with expanding size, minimum size = __ICFEDIT_size_heap__, alignment = 8 { };
3333

3434
define region FlashConfig_region = mem:[from __FlashConfig_start__ to __FlashConfig_end__];
3535

targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/device/TOOLCHAIN_IAR/MKL25Z4.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to (__FlashCon
2929
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__] | mem:[from __region_RAM2_start__ to __region_RAM2_end__];
3030

3131
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
32-
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
32+
define block HEAP with expanding size, minimum size = __ICFEDIT_size_heap__, alignment = 8 { };
3333

3434
define region FlashConfig_region = mem:[from __FlashConfig_start__ to __FlashConfig_end__];
3535

targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL26Z/device/TOOLCHAIN_IAR/MKL26Z4.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to (__FlashCon
2929
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__] | mem:[from __region_RAM2_start__ to __region_RAM2_end__];
3030

3131
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
32-
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
32+
define block HEAP with expanding size, minimum size = __ICFEDIT_size_heap__, alignment = 8 { };
3333

3434
define region FlashConfig_region = mem:[from __FlashConfig_start__ to __FlashConfig_end__];
3535

targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/device/TOOLCHAIN_IAR/MKL46Z4.icf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to (__FlashCon
2929
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__] | mem:[from __region_RAM2_start__ to __region_RAM2_end__];
3030

3131
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
32-
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
33-
32+
define block HEAP with expanding size, minimum size = __ICFEDIT_size_heap__, alignment = 8 { };
3433
define region FlashConfig_region = mem:[from __FlashConfig_start__ to __FlashConfig_end__];
3534

3635
initialize by copy { readwrite };

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/device/TOOLCHAIN_IAR/MK66FN2M0xxx18.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ define region CSTACK_region = mem:[from m_data_2_end-__size_cstack__+1 to m_data
112112
define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end];
113113

114114
define block CSTACK with alignment = 8, size = __size_cstack__ { };
115-
define block HEAP with alignment = 8, size = __size_heap__ { };
115+
define block HEAP with expanding size, minimum size = __size_heap__, alignment = 8 { };
116116
define block RW { readwrite };
117117
define block ZI { zi };
118118

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K82F/device/TOOLCHAIN_IAR/MK82FN256xxx15.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ define region CSTACK_region = mem:[from m_data_2_end-__size_cstack__+1 to m_data
107107
define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end];
108108

109109
define block CSTACK with alignment = 8, size = __size_cstack__ { };
110-
define block HEAP with alignment = 8, size = __size_heap__ { };
110+
define block HEAP with expanding size, minimum size = __size_heap__, alignment = 8 { };
111111
define block RW { readwrite };
112112
define block ZI { zi };
113113

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL27Z/device/TOOLCHAIN_IAR/MKL27Z64xxx4.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_e
100100
define region m_interrupts_ram_region = mem:[from m_interrupts_ram_start to m_interrupts_ram_end];
101101

102102
define block CSTACK with alignment = 8, size = __size_cstack__ { };
103-
define block HEAP with alignment = 8, size = __size_heap__ { };
103+
define block HEAP with expanding size, minimum size = __size_heap__, alignment = 8 { };
104104
define block RW { readwrite };
105105
define block ZI { zi };
106106

0 commit comments

Comments
 (0)