mirror of https://github.com/ARMmbed/mbed-os.git
Fix memory reservation for Softdevice in NRF52_DK
parent
b6f0ee2a72
commit
1a9999708e
|
@ -9,13 +9,13 @@
|
||||||
#define MBED_APP_SIZE 0x80000
|
#define MBED_APP_SIZE 0x80000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If app_start is 0, do not set aside space for the softdevice */
|
/* If softdevice is present, set aside space for it */
|
||||||
#if MBED_APP_START == 0
|
#if defined(SOFTDEVICE_PRESENT)
|
||||||
#define MBED_RAM_START 0x20000000
|
|
||||||
#define MBED_RAM_SIZE 0x10000
|
|
||||||
#else
|
|
||||||
#define MBED_RAM_START 0x200031D0
|
#define MBED_RAM_START 0x200031D0
|
||||||
#define MBED_RAM_SIZE 0xCE30
|
#define MBED_RAM_SIZE 0xCE30
|
||||||
|
#else
|
||||||
|
#define MBED_RAM_START 0x20000000
|
||||||
|
#define MBED_RAM_SIZE 0x10000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MBED_RAM0_START MBED_RAM_START
|
#define MBED_RAM0_START MBED_RAM_START
|
||||||
|
|
|
@ -25,13 +25,13 @@
|
||||||
#define MBED_APP_SIZE 0x80000
|
#define MBED_APP_SIZE 0x80000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If app_start is 0, do not set aside space for the softdevice */
|
/* If softdevice is present, set aside space for it */
|
||||||
#if MBED_APP_START == 0
|
#if defined(SOFTDEVICE_PRESENT)
|
||||||
#define MBED_RAM_START 0x20000000
|
|
||||||
#define MBED_RAM_SIZE 0x10000
|
|
||||||
#else
|
|
||||||
#define MBED_RAM_START 0x200031D0
|
#define MBED_RAM_START 0x200031D0
|
||||||
#define MBED_RAM_SIZE 0xCE30
|
#define MBED_RAM_SIZE 0xCE30
|
||||||
|
#else
|
||||||
|
#define MBED_RAM_START 0x20000000
|
||||||
|
#define MBED_RAM_SIZE 0x10000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MBED_RAM0_START MBED_RAM_START
|
#define MBED_RAM0_START MBED_RAM_START
|
||||||
|
|
|
@ -11,13 +11,13 @@ if (!isdefinedsymbol(MBED_APP_SIZE)) {
|
||||||
define symbol MBED_APP_SIZE = 0x80000;
|
define symbol MBED_APP_SIZE = 0x80000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If app_start is 0, do not set aside space for the softdevice */
|
/* If softdevice is present, set aside space for it */
|
||||||
if (MBED_APP_START == 0) {
|
if (isdefinedsymbol(SOFTDEVICE_PRESENT)) {
|
||||||
define symbol MBED_RAM_START = 0x20000000;
|
|
||||||
define symbol MBED_RAM_SIZE = 0x10000;
|
|
||||||
} else {
|
|
||||||
define symbol MBED_RAM_START = 0x200031D0;
|
define symbol MBED_RAM_START = 0x200031D0;
|
||||||
define symbol MBED_RAM_SIZE = 0xCE30;
|
define symbol MBED_RAM_SIZE = 0xCE30;
|
||||||
|
} else {
|
||||||
|
define symbol MBED_RAM_START = 0x20000000;
|
||||||
|
define symbol MBED_RAM_SIZE = 0x10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
define symbol MBED_RAM0_START = MBED_RAM_START;
|
define symbol MBED_RAM0_START = MBED_RAM_START;
|
||||||
|
|
|
@ -706,8 +706,8 @@ class mbedToolchain:
|
||||||
self._add_defines_from_region(region)
|
self._add_defines_from_region(region)
|
||||||
if region.active:
|
if region.active:
|
||||||
for define in [
|
for define in [
|
||||||
("%s_START" % active_region_name, region.start),
|
("%s_START" % active_region_name, "0x%x" % region.start),
|
||||||
("%s_SIZE" % active_region_name, region.size)
|
("%s_SIZE" % active_region_name, "0x%x" % region.size)
|
||||||
]:
|
]:
|
||||||
define_string = self.make_ld_define(*define)
|
define_string = self.make_ld_define(*define)
|
||||||
self.ld.append(define_string)
|
self.ld.append(define_string)
|
||||||
|
@ -747,6 +747,11 @@ class mbedToolchain:
|
||||||
self.config_data = config_data
|
self.config_data = config_data
|
||||||
# new configuration data can change labels, so clear the cache
|
# new configuration data can change labels, so clear the cache
|
||||||
self.labels = None
|
self.labels = None
|
||||||
|
# pass info about softdevice presence to linker (see NRF52)
|
||||||
|
if "SOFTDEVICE_PRESENT" in config_data[1]:
|
||||||
|
define_string = self.make_ld_define("SOFTDEVICE_PRESENT", config_data[1]["SOFTDEVICE_PRESENT"].macro_value)
|
||||||
|
self.ld.append(define_string)
|
||||||
|
self.flags["ld"].append(define_string)
|
||||||
self.add_regions()
|
self.add_regions()
|
||||||
|
|
||||||
# Creates the configuration header if needed:
|
# Creates the configuration header if needed:
|
||||||
|
|
|
@ -325,7 +325,7 @@ class ARM(mbedToolchain):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def make_ld_define(name, value):
|
def make_ld_define(name, value):
|
||||||
return "--predefine=\"-D%s=0x%x\"" % (name, value)
|
return "--predefine=\"-D%s=%s\"" % (name, value)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def redirect_symbol(source, sync, build_dir):
|
def redirect_symbol(source, sync, build_dir):
|
||||||
|
@ -426,7 +426,7 @@ class ARMC6(ARM_STD):
|
||||||
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
|
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
|
||||||
# Add linking time preprocessor macro __DOMAIN_NS
|
# Add linking time preprocessor macro __DOMAIN_NS
|
||||||
if target.core == "Cortex-M23-NS" or self.target.core == "Cortex-M33-NS":
|
if target.core == "Cortex-M23-NS" or self.target.core == "Cortex-M33-NS":
|
||||||
define_string = self.make_ld_define("__DOMAIN_NS", 1)
|
define_string = self.make_ld_define("__DOMAIN_NS", "0x1")
|
||||||
self.flags["ld"].append(define_string)
|
self.flags["ld"].append(define_string)
|
||||||
|
|
||||||
asm_cpu = {
|
asm_cpu = {
|
||||||
|
|
|
@ -293,7 +293,7 @@ class GCC(mbedToolchain):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def make_ld_define(name, value):
|
def make_ld_define(name, value):
|
||||||
return "-D%s=0x%x" % (name, value)
|
return "-D%s=%s" % (name, value)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def redirect_symbol(source, sync, build_dir):
|
def redirect_symbol(source, sync, build_dir):
|
||||||
|
|
|
@ -273,7 +273,7 @@ class IAR(mbedToolchain):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def make_ld_define(name, value):
|
def make_ld_define(name, value):
|
||||||
return "--config_def %s=0x%x" % (name, value)
|
return "--config_def %s=%s" % (name, value)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def redirect_symbol(source, sync, build_dir):
|
def redirect_symbol(source, sync, build_dir):
|
||||||
|
|
Loading…
Reference in New Issue