@@ -342,9 +342,13 @@ def __init__(self, target, notify=None, macros=None,
342
342
build_profile = None , build_dir = None ):
343
343
ARM .__init__ (self , target , notify , macros , build_dir = build_dir ,
344
344
build_profile = build_profile )
345
- #check only for ARMC5 because ARM_STD means using ARMC5, and thus supported_toolchains must include ARMC5
346
- if "ARMC5" not in target .supported_toolchains :
347
- raise NotSupportedException ("ARM compiler 5 support is required for ARM build" )
345
+ if int (target .build_tools_metadata ["version" ]) > 0 :
346
+ #check only for ARMC5 because ARM_STD means using ARMC5, and thus supported_toolchains must include ARMC5
347
+ if "ARMC5" not in target .supported_toolchains :
348
+ raise NotSupportedException ("ARM compiler 5 support is required for ARM build" )
349
+ else :
350
+ if not set (("ARM" , "uARM" )).intersection (set (target .supported_toolchains )):
351
+ raise NotSupportedException ("ARM/uARM compiler support is required for ARM build" )
348
352
349
353
class ARM_MICRO (ARM ):
350
354
PATCHED_LIBRARY = False
@@ -354,13 +358,16 @@ def __init__(self, target, notify=None, macros=None,
354
358
build_dir = None ):
355
359
target .default_toolchain = "uARM"
356
360
357
- #At this point we already know that we want to use ARMC5+Microlib, so check for if they are supported
358
- #For, AC6+Microlib we still use ARMC6 class
359
- if not set (("uARM" ,"ARMC5" )).issubset (set (target .supported_toolchains )):
360
- raise NotSupportedException ("ARM/uARM compiler support is required for ARM build" )
361
+ if int (target .build_tools_metadata ["version" ]) > 0 :
362
+ #At this point we already know that we want to use ARMC5+Microlib, so check for if they are supported
363
+ #For, AC6+Microlib we still use ARMC6 class
364
+ if not set (("ARMC5" ,"uARM" )).issubset (set (target .supported_toolchains )):
365
+ raise NotSupportedException ("ARM/uARM compiler support is required for ARM build" )
366
+ else :
367
+ if not set (("ARM" , "uARM" )).intersection (set (target .supported_toolchains )):
368
+ raise NotSupportedException ("ARM/uARM compiler support is required for ARM build" )
361
369
ARM .__init__ (self , target , notify , macros , build_dir = build_dir ,
362
370
build_profile = build_profile )
363
-
364
371
365
372
class ARMC6 (ARM_STD ):
366
373
OFFICIALLY_SUPPORTED = True
@@ -382,8 +389,12 @@ def __init__(self, target, *args, **kwargs):
382
389
raise NotSupportedException (
383
390
"this compiler does not support the core %s" % target .core )
384
391
385
- if not set (("ARM" , "ARMC6" , "uARM" )).intersection (set (target .supported_toolchains )):
386
- raise NotSupportedException ("ARM/ARMC6 compiler support is required for ARMC6 build" )
392
+ if int (target .build_tools_metadata ["version" ]) > 0 :
393
+ if not set (("ARM" , "ARMC6" , "uARM" )).intersection (set (target .supported_toolchains )):
394
+ raise NotSupportedException ("ARM/ARMC6 compiler support is required for ARMC6 build" )
395
+ else :
396
+ if not set (("ARM" , "ARMC6" )).intersection (set (target .supported_toolchains )):
397
+ raise NotSupportedException ("ARM/ARMC6 compiler support is required for ARMC6 build" )
387
398
388
399
if getattr (target , "default_toolchain" , "ARMC6" ) == "uARM" :
389
400
if "-DMBED_RTOS_SINGLE_THREAD" not in self .flags ['common' ]:
0 commit comments