@@ -33,6 +33,8 @@ class ARM(mbedToolchain):
33
33
INDEX_PATTERN = re .compile ('(?P<col>\s*)\^' )
34
34
DEP_PATTERN = re .compile ('\S+:\s(?P<file>.+)\n ' )
35
35
SHEBANG = "#! armcc -E"
36
+ SUPPORTED_CORES = ["Cortex-M0" , "Cortex-M0+" , "Cortex-M3" , "Cortex-M4" ,
37
+ "Cortex-M4F" , "Cortex-M7" , "Cortex-M7F" , "Cortex-M7FD" ]
36
38
37
39
@staticmethod
38
40
def check_executable ():
@@ -48,6 +50,9 @@ def __init__(self, target, notify=None, macros=None,
48
50
build_dir = build_dir ,
49
51
extra_verbose = extra_verbose ,
50
52
build_profile = build_profile )
53
+ if target .core not in self .SUPPORTED_CORES :
54
+ raise NotSupportedException (
55
+ "this compiler does not support the core %s" % target .core )
51
56
52
57
if target .core == "Cortex-M0+" :
53
58
cpu = "Cortex-M0"
@@ -285,12 +290,19 @@ def __init__(self, target, notify=None, macros=None,
285
290
286
291
class ARMC6 (ARM_STD ):
287
292
SHEBANG = "#! armclang -E --target=arm-arm-none-eabi -x c"
293
+ SUPPORTED_CORES = ["Cortex-M0" , "Cortex-M0+" , "Cortex-M3" , "Cortex-M4" ,
294
+ "Cortex-M4F" , "Cortex-M7" , "Cortex-M7F" , "Cortex-M7FD" ,
295
+ "Cortex-M23" , "Cortex-M23-NS" , "Cortex-M33" ,
296
+ "CortexM33-NS" ]
288
297
@staticmethod
289
298
def check_executable ():
290
299
return mbedToolchain .generic_check_executable ("ARMC6" , "armclang" , 1 )
291
300
292
301
def __init__ (self , target , * args , ** kwargs ):
293
302
mbedToolchain .__init__ (self , target , * args , ** kwargs )
303
+ if target .core not in self .SUPPORTED_CORES :
304
+ raise NotSupportedException (
305
+ "this compiler does not support the core %s" % target .core )
294
306
295
307
if not set (("ARM" , "ARMC6" )).intersection (set (target .supported_toolchains )):
296
308
raise NotSupportedException ("ARM/ARMC6 compiler support is required for ARMC6 build" )
0 commit comments