mirror of https://github.com/ARMmbed/mbed-os.git
MCU_NRF52832: use two-region memory layout (stack + heap) to support MicroLib
MicroLib is the lightweight C lib for the Arm toolchain and used as the default C lib on bare metal builds with the Arm toolchain. It requires two separate memory regions for stack and heap. The change is based on nRF52840.sct.pull/13951/head
parent
f2278567d0
commit
b174edb282
|
@ -26,22 +26,23 @@
|
|||
|
||||
#define MBED_RAM0_START MBED_RAM_START
|
||||
#define MBED_RAM0_SIZE 0xE0
|
||||
#define MBED_RAM1_START (MBED_RAM_START + MBED_RAM0_SIZE)
|
||||
#define MBED_RAM1_START (MBED_RAM0_START + MBED_RAM0_SIZE)
|
||||
#define MBED_RAM1_SIZE (MBED_RAM_SIZE - MBED_RAM0_SIZE)
|
||||
|
||||
LR_IROM1 MBED_APP_START MBED_APP_SIZE {
|
||||
ER_IROM1 MBED_APP_START MBED_APP_SIZE {
|
||||
*.o (RESET, +First)
|
||||
*(InRoot$$Sections)
|
||||
*(InRoot$$Sections)
|
||||
.ANY (+RO)
|
||||
}
|
||||
|
||||
RW_IRAM0 MBED_RAM0_START UNINIT MBED_RAM0_SIZE { ;no init section
|
||||
*(*nvictable)
|
||||
}
|
||||
RW_IRAM1 MBED_RAM1_START MBED_RAM1_SIZE {
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
ARM_LIB_STACK MBED_RAM1_START+MBED_RAM1_SIZE EMPTY -Stack_Size { ; Stack region growing down
|
||||
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM1_START + MBED_RAM1_SIZE - MBED_CONF_TARGET_BOOT_STACK_SIZE - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
|
||||
}
|
||||
ARM_LIB_STACK MBED_RAM1_START + MBED_RAM1_SIZE EMPTY - Stack_Size { ; Stack region growing down
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue