Skip to content

Commit

Permalink
Update cmse flag based on core_arch instead of different cores
Browse files Browse the repository at this point in the history
  • Loading branch information
deepikabhavnani committed Jan 23, 2019
1 parent 9a78756 commit 7292acf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/toolchains/iar.py
Expand Up @@ -19,6 +19,7 @@
from os.path import join, splitext, exists
from distutils.version import LooseVersion

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

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

0 comments on commit 7292acf

Please sign in to comment.