Skip to content

Commit afb559b

Browse files
author
deepikabhavnani
committed
Correct the floating options for Cortex-M7 and Cortex-M4
As per the IAR Development guide, below options for CPU are valid 1. Cortex-M4 2. Cortex-M4F 3. Cortex-M7 4. Cortex-M7.fp.dp (floating-point unit with support for double precision) 5. Cortex-M7.fp.sp (floating-point unit with support for single precision)
1 parent 659f083 commit afb559b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tools/toolchains/iar.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
4646
build_dir=None):
4747
mbedToolchain.__init__(self, target, notify, macros, build_dir=build_dir,
4848
build_profile=build_profile)
49-
if target.core == "Cortex-M7F" or target.core == "Cortex-M7FD":
50-
cpuchoice = "Cortex-M7"
49+
if target.core == "Cortex-M7FD":
50+
cpuchoice = "Cortex-M7.fp.dp"
51+
elif target.core == "Cortex-M7F":
52+
cpuchoice = "Cortex-M7.fp.sp"
5153
elif target.core.startswith("Cortex-M33FD"):
5254
cpuchoice = "Cortex-M33.fp"
5355
elif target.core.startswith("Cortex-M33F"):
@@ -73,12 +75,6 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
7375
cxx_flags_cmd = [
7476
"--c++", "--no_rtti", "--no_exceptions"
7577
]
76-
if target.core == "Cortex-M7FD":
77-
asm_flags_cmd += ["--fpu", "VFPv5"]
78-
c_flags_cmd.append("--fpu=VFPv5")
79-
elif target.core == "Cortex-M7F":
80-
asm_flags_cmd += ["--fpu", "VFPv5_sp"]
81-
c_flags_cmd.append("--fpu=VFPv5_sp")
8278

8379
# Create Secure library
8480
if CORE_ARCH[target.core] == 8 and not target.core.endswith("-NS"):

0 commit comments

Comments
 (0)