mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11006 from linlingao/pr10692
Introduce an Mbed config to enable XIPpull/11441/head
commit
458523219a
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -953,6 +953,7 @@ class mbedToolchain:
|
|||
|
||||
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
|
||||
|
@ -974,6 +975,14 @@ class mbedToolchain:
|
|||
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"),
|
||||
|
|
Loading…
Reference in New Issue