Skip to content

Commit 1c671c4

Browse files
Refactor definition of heap load region start
1 parent 18d8499 commit 1c671c4

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

targets/TARGET_Maxim/TARGET_MAX32620C/device/TOOLCHAIN_ARM_STD/MAX32620.sct

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,19 @@
3535
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
3636
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
3737

38+
#define MBED_RAM1_START (MBED_RAM_START+VECTOR_SIZE)
39+
#define MBED_RAM1_SIZE (MBED_RAM_SIZE-RAM_FIXED_SIZE)
40+
3841
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
3942
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
4043
*.o (RESET, +First)
4144
*(InRoot$$Sections)
4245
.ANY (+RO)
4346
}
44-
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-RAM_FIXED_SIZE) { ; RW data
47+
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { ; RW data
4548
.ANY (+RW +ZI)
4649
}
47-
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM_START)){ ; heap region growing up
50+
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)){ ; heap region growing up
4851
}
4952
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
5053
}

targets/TARGET_Maxim/TARGET_MAX32625/device/TOOLCHAIN_ARM_STD/TARGET_MAX32625_BOOT/MAX32625.sct

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,21 @@
3232
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
3333
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
3434

35+
#define MBED_RAM1_START (MBED_RAM_START+VECTOR_SIZE)
36+
#define MBED_RAM1_SIZE (MBED_RAM_SIZE-RAM_FIXED_SIZE)
37+
3538
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
3639
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
3740
*.o (RESET, +First)
3841
*(InRoot$$Sections)
3942
.ANY (+RO)
4043
}
4144

42-
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-RAM_FIXED_SIZE) { ; RW data
45+
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { ; RW data
4346
.ANY (+RW +ZI)
4447
}
4548

46-
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM_START)){ ; heap region growing up
49+
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)){ ; heap region growing up
4750
}
4851
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
4952
}

targets/TARGET_Maxim/TARGET_MAX32625/device/TOOLCHAIN_ARM_STD/TARGET_MAX32625_NO_BOOT/MAX32625.sct

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
3333
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
3434

35+
#define MBED_RAM1_START (MBED_RAM_START+VECTOR_SIZE)
36+
#define MBED_RAM1_SIZE (MBED_RAM_SIZE-RAM_FIXED_SIZE)
37+
3538
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
3639
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
3740
*.o (RESET, +First)
@@ -40,10 +43,10 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
4043
}
4144

4245
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
43-
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-RAM_FIXED_SIZE) { ; RW data
46+
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { ; RW data
4447
.ANY (+RW +ZI)
4548
}
46-
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM_START)){ ; heap region growing up
49+
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)){ ; heap region growing up
4750
}
4851
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
4952
}

targets/TARGET_Maxim/TARGET_MAX32630/device/TOOLCHAIN_ARM_STD/MAX3263x.sct

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
3434
#define RAM_FIXED_SIZE (Stack_Size + VECTOR_SIZE)
3535

36+
#define MBED_RAM1_START (MBED_RAM_START+VECTOR_SIZE)
37+
#define MBED_RAM1_SIZE (MBED_RAM_SIZE-RAM_FIXED_SIZE)
38+
3639
LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
3740
ER_IROM1 MBED_APP_START MBED_APP_SIZE { ; load address = execution address
3841
*.o (RESET, +First)
@@ -41,10 +44,10 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region
4144
}
4245

4346
; [RAM] Vector table dynamic copy: 68 vectors * 4 bytes = 272 (0x110)
44-
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-RAM_FIXED_SIZE) { ; RW data
47+
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE { ; RW data
4548
.ANY (+RW +ZI)
4649
}
47-
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM_START)){ ; heap region growing up
50+
ARM_LIB_HEAP AlignExpr(+0, +16) EMPTY (MBED_RAM_SIZE - RAM_FIXED_SIZE - (AlignExpr(ImageLimit(RW_IRAM1), 16) - MBED_RAM1_START)){ ; heap region growing up
4851
}
4952
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -Stack_Size { ; stack region growing down
5053
}

0 commit comments

Comments
 (0)