Skip to content

Commit 8800ad5

Browse files
Oren CohenMichael Schwarcz
authored andcommitted
TFM: Add defines to mbed_lib.json
1 parent 6354b9a commit 8800ad5

File tree

4 files changed

+34
-30
lines changed

4 files changed

+34
-30
lines changed
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
11
{
2-
"name": "tfm",
3-
"config": {
4-
"handle_pool_size": {
5-
"help": "maximum number of handles that can be opened at the same time",
6-
"macro_name": "TFM_CONN_HANDLE_MAX_NUM",
7-
"value": 10
8-
},
9-
"rot_pool_size": {
10-
"help": "maximum number of RoT services allowed",
11-
"macro_name": "TFM_SPM_MAX_ROT_SERV_NUM",
12-
"value": 20
13-
},
14-
"message_pool_size": {
15-
"help": "maximum number of RoT services allowed",
16-
"macro_name": "TFM_MSG_QUEUE_MAX_MSG_NUM",
17-
"value": 10
18-
}
19-
}
2+
"name": "tfm-s",
3+
"macros": ["MBED_FAULT_HANDLER_DISABLED", "BYPASS_NVSTORE_CHECK=1"]
204
}
21-
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "tfm",
3+
"macros": [
4+
"TFM_PSA_API", "MBED_TZ_DEFAULT_ACCESS=1"
5+
],
6+
"config": {
7+
"level": {
8+
"help": "TFM security level",
9+
"macro_name": "TFM_LVL",
10+
"value": 1
11+
},
12+
"handle_pool_size": {
13+
"help": "maximum number of handles that can be opened at the same time",
14+
"macro_name": "TFM_CONN_HANDLE_MAX_NUM",
15+
"value": 10
16+
},
17+
"rot_pool_size": {
18+
"help": "maximum number of RoT services allowed",
19+
"macro_name": "TFM_SPM_MAX_ROT_SERV_NUM",
20+
"value": 20
21+
},
22+
"message_pool_size": {
23+
"help": "maximum number of RoT services allowed",
24+
"macro_name": "TFM_MSG_QUEUE_MAX_MSG_NUM",
25+
"value": 10
26+
}
27+
}
28+
}
29+

components/TARGET_PSA/TARGET_TFM/tf-m-integration.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ The target should be represented in a following way in `target.json` (`MUSCA_A1`
6464
"core": "Cortex-M33-NS",
6565
"device_has_add": ["INTERRUPTIN", "LPTICKER", "SERIAL", "SLEEP", "USTICKER"],
6666
"macros": [
67-
"MBED_TZ_DEFAULT_ACCESS=1",
6867
"MBED_FAULT_HANDLER_DISABLED",
69-
"TFM_PSA_API",
7068
"MBEDTLS_PSA_CRYPTO_C"
7169
],
7270
"extra_labels_add": ["MUSCA_A1_NS", "PSA", "TFM"],
@@ -77,16 +75,10 @@ The target should be represented in a following way in `target.json` (`MUSCA_A1`
7775
"core": "Cortex-M33",
7876
"device_has_add": ["FLASH"],
7977
"macros": [
80-
"MBED_FAULT_HANDLER_DISABLED",
8178
"MBED_MPU_CUSTOM",
82-
"BYPASS_NVSTORE_CHECK",
83-
"TFM_LVL=1",
84-
"TFM_PSA_API",
8579
"MBEDTLS_PSA_CRYPTO_SPM",
8680
"MBEDTLS_PSA_CRYPTO_C",
87-
"MBEDTLS_ENTROPY_NV_SEED",
88-
"MBEDTLS_PLATFORM_NV_SEED_READ_MACRO=mbed_default_seed_read",
89-
"MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO=mbed_default_seed_write"
81+
"MBEDTLS_ENTROPY_NV_SEED"
9082
],
9183
"components_add": ["FLASHIAP"],
9284
"extra_labels_add": ["MUSCA_A1_S", "PSA", "TFM"]
@@ -116,4 +108,4 @@ Mbed-OS contains customized TF-M version. TF-M services reference implementation
116108

117109
The porting layer consists of:
118110
- All functions listed in: `components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/platform/include/tfm_spm_hal.h`
119-
- Flash API `mbed-os/hal/flash_api.h` implementation is required for TZ image. It is used by PSA Internal trusted storage implementation.
111+
- Flash API `mbed-os/hal/flash_api.h` implementation is required for TZ image. It is used by PSA Internal trusted storage implementation.

tools/psa/tfm/mbed_app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "tfm_build",
3-
"requires" : ["psa-services", "tfm"],
3+
"requires" : ["psa-services", "tfm", "tfm-s"],
44
"artifact_name": "tfm"
55
}

0 commit comments

Comments
 (0)