@@ -32,9 +32,12 @@ class IAR(mbedToolchain):
32
32
33
33
def __init__ (self , target , options = None , notify = None , macros = None , silent = False , extra_verbose = False ):
34
34
mbedToolchain .__init__ (self , target , options , notify , macros , silent , extra_verbose = extra_verbose )
35
-
35
+ if target .core == "Cortex-M7F" :
36
+ cpuchoice = "Cortex-M7"
37
+ else :
38
+ cpuchoice = target .core
36
39
c_flags = [
37
- "--cpu=%s" % target . core , "--thumb" ,
40
+ "--cpu=%s" % cpuchoice , "--thumb" ,
38
41
"--dlib_config" , join (IAR_PATH , "inc" , "c" , "DLib_Config_Full.h" ),
39
42
"-e" , # Enable IAR language extension
40
43
"--no_wrap_diagnostics" ,
@@ -45,6 +48,10 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
45
48
"--diag_suppress=Pa050,Pa084,Pa093,Pa082" ,
46
49
]
47
50
51
+ if target .core == "Cortex-M7F" :
52
+ c_flags .append ("--fpu=VFPv5_sp" )
53
+
54
+
48
55
if "debug-info" in self .options :
49
56
c_flags .append ("-r" )
50
57
c_flags .append ("-On" )
@@ -53,7 +60,7 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
53
60
54
61
IAR_BIN = join (IAR_PATH , "bin" )
55
62
main_cc = join (IAR_BIN , "iccarm" )
56
- self .asm = [join (IAR_BIN , "iasmarm" )] + ["--cpu" , target . core ]
63
+ self .asm = [join (IAR_BIN , "iasmarm" )] + ["--cpu" , cpuchoice ]
57
64
if not "analyze" in self .options :
58
65
self .cc = [main_cc ] + c_flags
59
66
self .cppc = [main_cc , "--c++" , "--no_rtti" , "--no_exceptions" ] + c_flags
0 commit comments