Skip to content

Commit 7292acf

Browse files
author
deepikabhavnani
committed
Update cmse flag based on core_arch instead of different cores
1 parent 9a78756 commit 7292acf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/toolchains/iar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from os.path import join, splitext, exists
2020
from distutils.version import LooseVersion
2121

22+
from tools.targets import CORE_ARCH
2223
from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
2324
from tools.hooks import hook_tool
2425
from tools.utils import run_cmd, NotSupportedException
@@ -81,8 +82,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
8182
c_flags_cmd.append("--fpu=VFPv5_sp")
8283

8384
# Create Secure library
84-
if ((target.core.startswith("Cortex-M23") or target.core.startswith("Cortex-M33"))
85-
and not target.core.endswith("-NS")):
85+
if CORE_ARCH[target.core] == 8 and not target.core.endswith("-NS"):
8686
self.flags["asm"] += ["--cmse"]
8787
self.flags["common"] += ["--cmse"]
8888
secure_file = join(build_dir, "cmse_lib.o")

0 commit comments

Comments
 (0)