mirror of https://github.com/ARMmbed/mbed-os.git
nRF52_DK: Use mbed_lib.json to set app_offset (MBED_APP_START)
When the SoftDevice (SD) is enabled we need to set the app_offset to 0x26000 to make room for the SoftDevice. If we let the build tools self-manage this, MBED_APP_START is coming out at 0x25000 which is not correct for the Nordic 15.0 SDK. The app_offset value is translated to MBED_APP_START by the build infrastructure. We were hard coding MBED_APP_START in the scatter and ld files as a temporary measure while testing. This now sets it properly if the SD is being brought in.pull/10652/head
parent
317598604a
commit
f79531414f
|
@ -15,7 +15,7 @@
|
|||
#if !defined(MBED_RAM_START)
|
||||
#if defined(SOFTDEVICE_PRESENT)
|
||||
#define MBED_RAM_START 0x20001D70
|
||||
#define MBED_RAM_SIZE 0xCE30
|
||||
#define MBED_RAM_SIZE 0xE290
|
||||
#else
|
||||
#define MBED_RAM_START 0x20000000
|
||||
#define MBED_RAM_SIZE 0x10000
|
||||
|
@ -27,8 +27,8 @@
|
|||
#define MBED_RAM1_START (MBED_RAM_START + MBED_RAM0_SIZE)
|
||||
#define MBED_RAM1_SIZE (MBED_RAM_SIZE - MBED_RAM0_SIZE)
|
||||
|
||||
LR_IROM1 0x26000 MBED_APP_SIZE {
|
||||
ER_IROM1 0x26000 MBED_APP_SIZE {
|
||||
LR_IROM1 MBED_APP_START MBED_APP_SIZE {
|
||||
ER_IROM1 MBED_APP_START MBED_APP_SIZE {
|
||||
*.o (RESET, +First)
|
||||
*(InRoot$$Sections)
|
||||
.ANY (+RO)
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#if !defined(MBED_RAM_START)
|
||||
#if defined(SOFTDEVICE_PRESENT)
|
||||
#define MBED_RAM_START 0x20001D70
|
||||
#define MBED_RAM_SIZE 0xCE30
|
||||
#define MBED_RAM_SIZE 0xE290
|
||||
#else
|
||||
#define MBED_RAM_START 0x20000000
|
||||
#define MBED_RAM_SIZE 0x10000
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x26000, LENGTH = MBED_APP_SIZE
|
||||
FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||
RAM_NVIC (rwx) : ORIGIN = MBED_RAM0_START, LENGTH = MBED_RAM0_SIZE
|
||||
RAM (rwx) : ORIGIN = MBED_RAM1_START, LENGTH = MBED_RAM1_SIZE
|
||||
}
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
],
|
||||
"target_overrides": {
|
||||
"*": {
|
||||
"target.bootloader_img": "hex/s132_nrf52_6.0.0_softdevice.hex"
|
||||
"target.bootloader_img": "hex/s132_nrf52_6.0.0_softdevice.hex",
|
||||
"target.app_offset": "0x26000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue