mirror of https://github.com/ARMmbed/mbed-os.git
NRF52840: Fix heap size formula in scatter files
The heap size 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.pull/14130/head
parent
e917282d60
commit
4780dd55e5
|
@ -50,7 +50,7 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE {
|
||||||
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE {
|
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE {
|
||||||
.ANY (+RW +ZI)
|
.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 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