Skip to content

Commit 855cc6a

Browse files
committed
ARMv8: make non secure build when TZ is not used
1 parent 00f461e commit 855cc6a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
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 (target.is_PSA_secure_target or "MBED_TZ_DEFAULT_ACCESS=1" in target.macros):
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 (target.is_PSA_secure_target or "MBED_TZ_DEFAULT_ACCESS=1" in target.macros):
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 (target.is_PSA_secure_target or "MBED_TZ_DEFAULT_ACCESS=1" in target.macros):
5959
# Add linking time preprocessor macro DOMAIN_NS
6060
if target.core.endswith("-NS"):
6161
define_string = self.make_ld_define("DOMAIN_NS", "0x1")

0 commit comments

Comments
 (0)