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
Hugues Kamba 2021-01-08 18:32:46 +00:00
parent e917282d60
commit 4780dd55e5
1 changed files with 1 additions and 1 deletions

View File

@ -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
} }