Skip to content

Commit e61e92c

Browse files
committed
psa: Avoid re-definition of MBEDTLS_PSA_CRYPTO_C
Mbed TLS now enables PSA APIs by default on all targets. It's not necessary to explicitly enable MBEDTLS_PSA_CRYPTO_C, as that can be gotten from the Mbed TLS config.h. Avoiding re-definition will eliminate warnings like the following, when building mbed-os-example-blinky: Compile [ 14.5%]: pal_client_api_empty_intf.c [Warning] pal_client_api_intf.h@35,0: "PSA_SUCCESS" redefined Compile [ 14.6%]: pal_client_api_intf.c Compile [ 14.7%]: DeviceKey.cpp Compile [ 14.9%]: pal_internal_trusted_storage_intf.c [Warning] pal_internal_trusted_storage_intf.c@45,9: 'psa_its_set' is deprecated: PS specific types should not be used [-Wdeprecated-declarations] Compile [ 15.3%]: val_attestation.c [Warning] client.h@40,0: "PSA_VERSION_NONE" redefined <..> Compile [ 33.3%]: asn1parse.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.5%]: aes.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.6%]: asn1write.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.7%]: psa_crypto.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.8%]: blowfish.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 33.9%]: camellia.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.0%]: base64.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.2%]: ccm.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.3%]: chacha20.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.4%]: chachapoly.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.5%]: cipher_wrap.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.6%]: cmac.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.7%]: cipher.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 34.9%]: bignum.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 35.0%]: des.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 35.1%]: dhm.c [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 35.2%]: ctr_drbg.c <..> Compile [ 70.9%]: EthernetInterface.cpp [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 71.0%]: InternetSocket.cpp Compile [ 71.1%]: L3IPInterface.cpp [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined Compile [ 71.2%]: NetworkInterface.cpp
1 parent 1470d06 commit e61e92c

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

targets/targets.json

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@
14851485
"PSA"
14861486
],
14871487
"is_disk_virtual": true,
1488-
"macros": ["CPU_MK64FN1M0VMD12", "FSL_RTOS_MBED", "MBEDTLS_PSA_CRYPTO_C"],
1488+
"macros": ["CPU_MK64FN1M0VMD12", "FSL_RTOS_MBED"],
14891489
"inherits": ["Target"],
14901490
"detect_code": ["0240"],
14911491
"device_has": [
@@ -1773,7 +1773,7 @@
17731773
"PSA"
17741774
],
17751775
"is_disk_virtual": true,
1776-
"macros": ["CPU_MK66FN2M0VMD18", "FSL_RTOS_MBED", "MBEDTLS_PSA_CRYPTO_C"],
1776+
"macros": ["CPU_MK66FN2M0VMD18", "FSL_RTOS_MBED"],
17771777
"inherits": ["Target"],
17781778
"detect_code": ["0311"],
17791779
"device_has": [
@@ -2073,7 +2073,6 @@
20732073
"MBED_FAULT_HANDLER_DISABLED",
20742074
"CMSIS_NVIC_VIRTUAL",
20752075
"MBED_MPU_CUSTOM",
2076-
"MBEDTLS_PSA_CRYPTO_C",
20772076
"NXP_LPADC"
20782077
],
20792078
"components_add": ["FLASHIAP"],
@@ -2124,8 +2123,8 @@
21242123
"__STARTUP_COPY_MULTIPLE",
21252124
"MBED_MPU_CUSTOM",
21262125
"DAUTH_CHIP_DEFAULT",
2127-
"MBEDTLS_PSA_CRYPTO_SPM",
2128-
"MBEDTLS_PSA_CRYPTO_C"
2126+
"MBEDTLS_PSA_CRYPTO_C",
2127+
"MBEDTLS_PSA_CRYPTO_SPM"
21292128
],
21302129
"components_add": ["FLASHIAP"],
21312130
"extra_labels_add": [
@@ -2816,8 +2815,7 @@
28162815
"components_add": ["FLASHIAP"],
28172816
"macros_add": [
28182817
"USB_STM_HAL",
2819-
"USBHOST_OTHER",
2820-
"MBEDTLS_PSA_CRYPTO_C"
2818+
"USBHOST_OTHER"
28212819
],
28222820
"device_has_add": [
28232821
"ANALOGOUT",
@@ -4561,9 +4559,6 @@
45614559
"device_has_remove": [],
45624560
"extra_labels_add": ["PSA"],
45634561
"components_add": ["SD", "FLASHIAP"],
4564-
"macros_add": [
4565-
"MBEDTLS_PSA_CRYPTO_C"
4566-
],
45674562
"config": {
45684563
"stdio_uart_tx_help": {
45694564
"help": "Value: D8(default) or D1"
@@ -5449,8 +5444,7 @@
54495444
"MBED_FAULT_HANDLER_DISABLED",
54505445
"CMSIS_NVIC_VIRTUAL",
54515446
"LPTICKER_DELAY_TICKS=1",
5452-
"MBED_MPU_CUSTOM",
5453-
"MBEDTLS_PSA_CRYPTO_C"
5447+
"MBED_MPU_CUSTOM"
54545448
],
54555449
"extra_labels_add": ["MUSCA_A1_NS", "PSA", "TFM"],
54565450
"post_binary_hook": {"function": "ArmMuscaA1Code.binary_hook"},
@@ -5472,8 +5466,8 @@
54725466
"__STARTUP_COPY_MULTIPLE",
54735467
"MBED_MPU_CUSTOM",
54745468
"DAUTH_CHIP_DEFAULT",
5475-
"MBEDTLS_PSA_CRYPTO_SPM",
54765469
"MBEDTLS_PSA_CRYPTO_C",
5470+
"MBEDTLS_PSA_CRYPTO_SPM",
54775471
"MBEDTLS_ENTROPY_NV_SEED"
54785472
],
54795473
"components_add": ["FLASHIAP"],
@@ -8311,8 +8305,8 @@
83118305
"extra_labels_add": ["PSA", "MBED_SPM"],
83128306
"macros_add": [
83138307
"MBED_TICKLESS",
8314-
"MBEDTLS_PSA_CRYPTO_SPM",
83158308
"MBEDTLS_PSA_CRYPTO_C",
8309+
"MBEDTLS_PSA_CRYPTO_SPM",
83168310
"PU_ENABLE"
83178311
],
83188312
"deliver_to_target": "CY8CKIT_062_WIFI_BT_PSA",
@@ -8337,7 +8331,6 @@
83378331
"extra_labels_add": ["PSA", "MBED_SPM"],
83388332
"components_add": ["SPM_MAILBOX", "FLASHIAP"],
83398333
"device_has_remove": ["CRC"],
8340-
"macros_add": ["MBEDTLS_PSA_CRYPTO_C"],
83418334
"hex_filename": "psa_release_1.0.hex",
83428335
"overrides": {
83438336
"secure-rom-start": "0x10000000",
@@ -8649,7 +8642,7 @@
86498642
],
86508643
"device_name": "GD32F450ZI",
86518644
"detect_code": ["1702"],
8652-
"macros_add": ["GD32F450", "MBEDTLS_PSA_CRYPTO_C"],
8645+
"macros_add": ["GD32F450"],
86538646
"bootloader_supported": true,
86548647
"release_versions": ["5"],
86558648
"overrides": {

0 commit comments

Comments
 (0)