Skip to content

Commit f00aeea

Browse files
committed
Apollo3: Fix heap size formula and stack start address in scatter file
The heapsize was incorrectly calculated. This fixes it by subtracting the Stack size, any memory chunks allocated before the start of the application (for vectors and/or crash report), and finally the size of the application from the total RAM size. The stack start address should be the top of the RAM which is also fixed.
1 parent e917282 commit f00aeea

File tree

1 file changed

+2
-2
lines changed
  • targets/TARGET_Ambiq_Micro/TARGET_Apollo3/TOOLCHAIN_ARM_STD

1 file changed

+2
-2
lines changed

targets/TARGET_Ambiq_Micro/TARGET_Apollo3/TOOLCHAIN_ARM_STD/AMA3B1KK.sct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE {
5656
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE {
5757
.ANY (+RW +ZI)
5858
}
59-
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE-RAM_FIXED_SIZE+MBED_RAM_START-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
59+
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE-RAM_FIXED_SIZE+MBED_RAM1_START-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
6060
}
61-
ARM_LIB_STACK MBED_RAM1_START+MBED_RAM1_SIZE-8 EMPTY -Stack_Size { ; Stack region growing down
61+
ARM_LIB_STACK MBED_RAM1_START+MBED_RAM1_SIZE EMPTY -Stack_Size { ; Stack region growing down
6262
}
6363
}

0 commit comments

Comments
 (0)