Skip to content

nRF5x: pass ram linker start/length from config system #7957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
#endif

/* If softdevice is present, set aside space for it */
#if defined(SOFTDEVICE_PRESENT)
#define MBED_RAM_START 0x200031D0
#define MBED_RAM_SIZE 0xCE30
#else
#define MBED_RAM_START 0x20000000
#define MBED_RAM_SIZE 0x10000
#if !defined(MBED_RAM_START)
#if defined(SOFTDEVICE_PRESENT)
#define MBED_RAM_START 0x200031D0
#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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
#endif

/* If softdevice is present, set aside space for it */
#if defined(SOFTDEVICE_PRESENT)
#define MBED_RAM_START 0x200031D0
#define MBED_RAM_SIZE 0xCE30
#else
#define MBED_RAM_START 0x20000000
#define MBED_RAM_SIZE 0x10000
#if !defined(MBED_RAM_START)
#if defined(SOFTDEVICE_PRESENT)
#define MBED_RAM_START 0x200031D0
#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
Expand Down Expand Up @@ -189,7 +191,7 @@ SECTIONS
PROVIDE(__start_fs_data = .);
KEEP(*(.fs_data))
PROVIDE(__stop_fs_data = .);

*(.jcr)
. = ALIGN(4);
/* All data end */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ if (!isdefinedsymbol(MBED_APP_SIZE)) {
}

/* If softdevice is present, set aside space for it */
if (isdefinedsymbol(SOFTDEVICE_PRESENT)) {
define symbol MBED_RAM_START = 0x200031D0;
define symbol MBED_RAM_SIZE = 0xCE30;
} else {
define symbol MBED_RAM_START = 0x20000000;
define symbol MBED_RAM_SIZE = 0x10000;
if (!isdefinedsymbol(MBED_RAM_START)) {
if (isdefinedsymbol(SOFTDEVICE_PRESENT)) {
define symbol MBED_RAM_START = 0x200031D0;
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
#define MBED_APP_SIZE 0x100000
#endif

/* If app_start is 0, do not set aside space for the softdevice */
#if MBED_APP_START == 0
#define MBED_RAM_START 0x20000000
#define MBED_RAM_SIZE 0x40000
#else
#define MBED_RAM_START 0x20003188
#define MBED_RAM_SIZE 0x3CE78
/* If softdevice is present, set aside space for it */
#if !defined(MBED_RAM_START)
#if defined(SOFTDEVICE_PRESENT)
#define MBED_RAM_START 0x20003188
#define MBED_RAM_SIZE 0x3CE78
#else
#define MBED_RAM_START 0x20000000
#define MBED_RAM_SIZE 0x40000
#endif
#endif

#define MBED_RAM0_START MBED_RAM_START
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
#define MBED_APP_SIZE 0x100000
#endif

/* If app_start is 0, do not set aside space for the softdevice */
#if MBED_APP_START == 0
#define MBED_RAM_START 0x20000000
#define MBED_RAM_SIZE 0x40000
#else
#define MBED_RAM_START 0x20003188
#define MBED_RAM_SIZE 0x3CE78
/* If softdevice is present, set aside space for it */
#if !defined(MBED_RAM_START)
#if defined(SOFTDEVICE_PRESENT)
#define MBED_RAM_START 0x20003188
#define MBED_RAM_SIZE 0x3CE78
#else
#define MBED_RAM_START 0x20000000
#define MBED_RAM_SIZE 0x40000
#endif
#endif

#define MBED_RAM0_START MBED_RAM_START
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ if (!isdefinedsymbol(MBED_APP_SIZE)) {
define symbol MBED_APP_SIZE = 0x100000;
}

/* If app_start is 0, do not set aside space for the softdevice */
if (MBED_APP_START == 0) {
define symbol MBED_RAM_START = 0x20000000;
define symbol MBED_RAM_SIZE = 0x40000;
} else {
define symbol MBED_RAM_START = 0x20003188;
define symbol MBED_RAM_SIZE = 0x3CE78;
/* If softdevice is present, set aside space for it */
if (!isdefinedsymbol(MBED_RAM_START)) {
if (isdefinedsymbol(SOFTDEVICE_PRESENT)) {
define symbol MBED_RAM_START = 0x20003188;
define symbol MBED_RAM_SIZE = 0x3CE78;
} else {
define symbol MBED_RAM_START = 0x20000000;
define symbol MBED_RAM_SIZE = 0x40000;
}
}

define symbol MBED_RAM0_START = MBED_RAM_START;
Expand Down
3 changes: 2 additions & 1 deletion tools/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,8 @@ def __init__(self, tgt, top_level_dirs=None, app_config=None):
self.target_labels = self.target.labels
for override in BOOTLOADER_OVERRIDES:
_, attr = override.split(".")
setattr(self.target, attr, None)
if not hasattr(self.target, attr):
setattr(self.target, attr, None)

self.cumulative_overrides = {key: ConfigCumulativeOverride(key)
for key in CUMULATIVE_ATTRIBUTES}
Expand Down