mirror of https://github.com/ARMmbed/mbed-os.git
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.pull/14132/head
parent
e917282d60
commit
f00aeea70f
|
|
@ -56,8 +56,8 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE {
|
|||
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE {
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE-RAM_FIXED_SIZE+MBED_RAM_START-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
|
||||
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE-RAM_FIXED_SIZE+MBED_RAM1_START-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
|
||||
}
|
||||
ARM_LIB_STACK MBED_RAM1_START+MBED_RAM1_SIZE-8 EMPTY -Stack_Size { ; Stack region growing down
|
||||
ARM_LIB_STACK MBED_RAM1_START+MBED_RAM1_SIZE EMPTY -Stack_Size { ; Stack region growing down
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue