Skip to content

Commit 447d3d6

Browse files
committed
Cortex M33: set DOMAIN_NS to 0 when TZ is not used
1 parent ba429a8 commit 447d3d6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

tools/toolchains/arm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def __init__(self, target, *args, **kwargs):
522522
self.flags['asm'].append("--library_type=microlib")
523523

524524
core = target.core
525-
if CORE_ARCH[target.core] == 8:
525+
if CORE_ARCH[target.core] == 8 and "TFM" in target.labels:
526526
if ((not target.core.endswith("-NS")) and
527527
kwargs.get('build_dir', False)):
528528
# Create Secure library

tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
6161

6262
core = target.core
6363
self.cpu = []
64-
if CORE_ARCH[target.core] == 8:
64+
if CORE_ARCH[target.core] == 8 and "TFM" in target.labels:
6565
# Add linking time preprocessor macro DOMAIN_NS
6666
if target.core.endswith("-NS"):
6767
self.flags["ld"].append("-DDOMAIN_NS=1")

tools/toolchains/iar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
5555
build_profile=build_profile
5656
)
5757
core = target.core
58-
if CORE_ARCH[target.core] == 8:
58+
if CORE_ARCH[target.core] == 8 and "TFM" in target.labels:
5959
# Add linking time preprocessor macro DOMAIN_NS
6060
if target.core.endswith("-NS"):
6161
define_string = self.make_ld_define("DOMAIN_NS", "0x1")

tools/toolchains/mbed_toolchain.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,22 @@
8888
"__CMSIS_RTOS", "__EVAL", "__MBED_CMSIS_RTOS_CA9"],
8989
"Cortex-M23-NS": ["__CORTEX_M23", "ARM_MATH_ARMV8MBL", "DOMAIN_NS=1",
9090
"__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
91-
"Cortex-M23": ["__CORTEX_M23", "ARM_MATH_ARMV8MBL", "__CMSIS_RTOS",
92-
"__MBED_CMSIS_RTOS_CM"],
91+
"Cortex-M23": ["__CORTEX_M23", "ARM_MATH_ARMV8MBL", "DOMAIN_NS=0",
92+
"__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
9393
"Cortex-M33-NS": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=1",
9494
"__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
95-
"Cortex-M33": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "__CMSIS_RTOS",
96-
"__MBED_CMSIS_RTOS_CM"],
95+
"Cortex-M33": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=0",
96+
"__CMSIS_RTOS", "__MBED_CMSIS_RTOS_CM"],
9797
"Cortex-M33F-NS": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=1",
9898
"__FPU_PRESENT=1U", "__CMSIS_RTOS",
9999
"__MBED_CMSIS_RTOS_CM"],
100-
"Cortex-M33F": ["__CORTEX_M33", "ARM_MATH_ARMV8MML",
100+
"Cortex-M33F": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=0",
101101
"__FPU_PRESENT=1U", "__CMSIS_RTOS",
102102
"__MBED_CMSIS_RTOS_CM"],
103103
"Cortex-M33FE-NS": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=1",
104104
"__FPU_PRESENT=1U", "__CMSIS_RTOS",
105105
"__MBED_CMSIS_RTOS_CM", "__DSP_PRESENT=1U"],
106-
"Cortex-M33FE": ["__CORTEX_M33", "ARM_MATH_ARMV8MML",
106+
"Cortex-M33FE": ["__CORTEX_M33", "ARM_MATH_ARMV8MML", "DOMAIN_NS=0",
107107
"__FPU_PRESENT=1U", "__CMSIS_RTOS",
108108
"__MBED_CMSIS_RTOS_CM", "__DSP_PRESENT=1U"],
109109
}

0 commit comments

Comments
 (0)