Skip to content

Commit 21de9a8

Browse files
author
deepikabhavnani
committed
Update IAR flags for Armv8M devices.
Cortex-M23 / Cortex-M33 CPU settings for baseline and mainline profile (with optional floating and dsp options) updated.
1 parent 77b624e commit 21de9a8

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

tools/toolchains/iar.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
4747
build_profile=build_profile)
4848
if target.core == "Cortex-M7F" or target.core == "Cortex-M7FD":
4949
cpuchoice = "Cortex-M7"
50-
elif target.core.startswith("Cortex-M23"):
51-
cpuchoice = "8-M.baseline"
50+
elif target.core.startswith("Cortex-M33FD"):
51+
cpuchoice = "Cortex-M33"
5252
elif target.core.startswith("Cortex-M33"):
53-
cpuchoice = "8-M.mainline"
53+
cpuchoice = "Cortex-M33.no_dsp"
54+
elif target.core.startswith("Cortex-M23"):
55+
cpuchoice = "Cortex-M23"
5456
else:
5557
cpuchoice = target.core
5658

@@ -74,12 +76,15 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
7476
elif target.core == "Cortex-M7F":
7577
asm_flags_cmd += ["--fpu", "VFPv5_sp"]
7678
c_flags_cmd.append("--fpu=VFPv5_sp")
77-
elif target.core == "Cortex-M23" or target.core == "Cortex-M33" or target.core == "Cortex-M33F":
78-
self.flags["asm"] += ["--cmse"]
79-
self.flags["common"] += ["--cmse"]
79+
elif target.core.startswith("Cortex-M33F"):
80+
asm_flags_cmd += ["--fpu", "VFPv5_sp"]
81+
c_flags_cmd.append("--fpu=VFPv5_sp")
8082

8183
# Create Secure library
82-
if target.core == "Cortex-M23" or self.target.core == "Cortex-M33" or self.target.core == "Cortex-M33F":
84+
if ((target.core.startswith("Cortex-M23") or target.core.startswith("Cortex-M33"))
85+
and not target.core.endswith("-NS")):
86+
self.flags["asm"] += ["--cmse"]
87+
self.flags["common"] += ["--cmse"]
8388
secure_file = join(build_dir, "cmse_lib.o")
8489
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
8590

0 commit comments

Comments
 (0)