Update `cmse` flag based on core_arch instead of different cores

pull/9431/head
deepikabhavnani 2019-01-23 09:38:22 -06:00 committed by Deepika
parent 80f6b0e002
commit 0082474ef2
1 changed files with 2 additions and 2 deletions

View File

@ -19,6 +19,7 @@ from os import remove
from os.path import join, splitext, exists from os.path import join, splitext, exists
from distutils.version import LooseVersion from distutils.version import LooseVersion
from tools.targets import CORE_ARCH
from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
from tools.hooks import hook_tool from tools.hooks import hook_tool
from tools.utils import run_cmd, NotSupportedException from tools.utils import run_cmd, NotSupportedException
@ -81,8 +82,7 @@ class IAR(mbedToolchain):
c_flags_cmd.append("--fpu=VFPv5_sp") c_flags_cmd.append("--fpu=VFPv5_sp")
# Create Secure library # Create Secure library
if ((target.core.startswith("Cortex-M23") or target.core.startswith("Cortex-M33")) if CORE_ARCH[target.core] == 8 and not target.core.endswith("-NS"):
and not target.core.endswith("-NS")):
self.flags["asm"] += ["--cmse"] self.flags["asm"] += ["--cmse"]
self.flags["common"] += ["--cmse"] self.flags["common"] += ["--cmse"]
secure_file = join(build_dir, "cmse_lib.o") secure_file = join(build_dir, "cmse_lib.o")