From 152f6f197575b65c271359dbf7d18447edd5a169 Mon Sep 17 00:00:00 2001 From: Chun-Chieh Li Date: Mon, 20 Jan 2020 10:03:20 +0800 Subject: [PATCH] M2351: Refine MBED_TZ_DEFAULT_ACCESS placement 1. On M2351, SYS/CLK registers are hard-wired to secure. Define MBED_TZ_DEFAULT_ACCESS to 1 so that all non-secure user threads have access to call secure functions to control these registers. 2. MBED_TZ_DEFAULT_ACCESS is only meaningful for non-secure target. Define it only for non-secure target in targets.json. 3. On TFM target, MBED_TZ_DEFAULT_ACCESS has defined in mbed_lib.json. Avoid duplicate definition which IAR assembler doesn't allow. --- targets/targets.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/targets/targets.json b/targets/targets.json index 737f36a252..2c5c984dea 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -12544,7 +12544,6 @@ "OUTPUT_EXT": "hex", "macros": [ "MBED_FAULT_HANDLER_DISABLED", - "MBED_TZ_DEFAULT_ACCESS=1", "LPTICKER_DELAY_TICKS=4" ], "is_disk_virtual": true, @@ -12683,7 +12682,6 @@ "NU_PREBUILD_SECURE" ], "macros_add": [ - "MBED_TZ_DEFAULT_ACCESS=1", "CMSIS_NVIC_VIRTUAL", "MBEDTLS_PSA_CRYPTO_C" ],