Skip to content
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
4 changes: 2 additions & 2 deletions targets/TARGET_Cypress/TARGET_PSOC6/mbed_overrides.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ void mbed_sdk_init(void)
us_ticker_init();
#endif

#if defined(CYBSP_ENABLE_FLASH_STORAGE)
#if MBED_CONF_TARGET_XIP_ENABLE
/* The linker script allows storing data in external memory, if needed, enable access to that memory. */
cybsp_serial_flash_init();
cybsp_serial_flash_enable_xip(true);
#endif /* defined(CYBSP_ENABLE_FLASH_STORAGE) */
#endif

/* Enable global interrupts (disabled in CM4 startup assembly) */
__enable_irq();
Expand Down
4 changes: 4 additions & 0 deletions targets/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
"init-us-ticker-at-boot": {
"help": "Initialize the microsecond ticker at boot rather than on first use, and leave it initialized. This speeds up wait_us in particular.",
"value": false
},
"xip-enable": {
"help": "Enable Execute In Place (XIP) on this target. Value is only significant if the board has executable external storage such as QSPIF. If this is enabled, customize the linker file to choose what text segments are placed on external storage",
"value": false
}
}
},
Expand Down
9 changes: 9 additions & 0 deletions tools/toolchains/mbed_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ def add_regions(self):

STACK_PARAM = "target.boot-stack-size"
TFM_LVL_PARAM = "tfm.level"
XIP_ENABLE_PARAM = "target.xip-enable"

def add_linker_defines(self):
params, _ = self.config_data
Expand All @@ -974,6 +975,14 @@ def add_linker_defines(self):
self.ld.append(define_string)
self.flags["ld"].append(define_string)

if self.XIP_ENABLE_PARAM in params:
define_string = self.make_ld_define(
"XIP_ENABLE",
params[self.XIP_ENABLE_PARAM].value
)
self.ld.append(define_string)
self.flags["ld"].append(define_string)

if self.target.is_PSA_secure_target:
for flag, param in [
("MBED_PUBLIC_RAM_START", "target.public-ram-start"),
Expand Down