Skip to content

Commit 9f88fce

Browse files
committed
[M2351] Support secure/non-secure combined build for PSA
Support secure/non-secure combined build for PSA target: 1. In secure post-build, deliver built secure image to TARGET_NU_PREBUILD_SECURE directory. 2. In non-secure post-build, merge non-secure image with secure image saved in TARGET_NU_PREBUILD_SECURE directory. 3. In non-secure post-build, user can also drop secure image saved in TARGET_NU_PREBUILD_SECURE directory and provide its own by adding the line below in mbed_app.json: "target.extra_labels_remove": ["NU_PREBUILD_SECURE"]
1 parent c9b4474 commit 9f88fce

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

targets/targets.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8842,13 +8842,20 @@
88428842
"inherits": ["NSPE_Target", "NU_PFM_M2351"],
88438843
"core": "Cortex-M23-NS",
88448844
"tfm.level": 1,
8845-
"extra_labels_add": ["M23_NS", "PSA", "TFM"],
8845+
"extra_labels_add": [
8846+
"M23_NS",
8847+
"PSA",
8848+
"TFM",
8849+
"NU_PREBUILD_SECURE"
8850+
],
88468851
"macros_add": [
88478852
"MBED_TZ_DEFAULT_ACCESS=1",
88488853
"CMSIS_NVIC_VIRTUAL",
88498854
"MBEDTLS_PSA_CRYPTO_C"
88508855
],
88518856
"components_add": ["FLASHIAP"],
8857+
"post_binary_hook": {"function": "M2351Code.merge_secure"},
8858+
"secure_image_filename": "tfm.hex",
88528859
"overrides": {
88538860
"secure-rom-start" : "0x0",
88548861
"secure-rom-size" : "0x40000",
@@ -8864,14 +8871,20 @@
88648871
"inherits": ["SPE_Target", "NU_PFM_M2351"],
88658872
"core": "Cortex-M23",
88668873
"tfm.level": 1,
8867-
"extra_labels_add": ["M23_S", "PSA", "TFM"],
8874+
"extra_labels_add": [
8875+
"M23_S",
8876+
"PSA",
8877+
"TFM"
8878+
],
88688879
"device_has_remove": ["SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "STDIO_MESSAGES"],
88698880
"macros_add": [
88708881
"DAUTH_CHIP_DEFAULT",
88718882
"MBEDTLS_PSA_CRYPTO_C",
88728883
"MBEDTLS_PSA_CRYPTO_SPM"
88738884
],
88748885
"components_add": ["FLASHIAP"],
8886+
"deliver_to_target": "NU_PFM_M2351_NS",
8887+
"delivery_dir": "TARGET_NUVOTON/TARGET_M2351/TARGET_M23_NS/TARGET_NU_PFM_M2351_NS/TARGET_NU_PREBUILD_SECURE",
88758888
"overrides": {
88768889
"secure-rom-start" : "0x0",
88778890
"secure-rom-size" : "0x40000",

0 commit comments

Comments
 (0)