@@ -121,6 +121,15 @@ def add_result_to_report(report, result):
121
121
result_wrap = {0 : result }
122
122
report [target ][toolchain ][id_name ].append (result_wrap )
123
123
124
+ def get_toolchain_name (target , toolchain_name ):
125
+ if toolchain_name == "ARM" :
126
+ if CORE_ARCH [target .core ] == 8 :
127
+ return "ARMC6"
128
+ elif getattr (target , "default_toolchain" , None ) == "uARM" :
129
+ return "uARM"
130
+
131
+ return toolchain_name
132
+
124
133
def get_config (src_paths , target , toolchain_name = None , app_config = None ):
125
134
"""Get the configuration object for a target-toolchain combination
126
135
@@ -316,8 +325,8 @@ def prepare_toolchain(src_paths, build_dir, target, toolchain_name,
316
325
raise NotSupportedException (
317
326
"Target {} is not supported by toolchain {}" .format (
318
327
target .name , toolchain_name ))
319
- if ( toolchain_name == "ARM" and CORE_ARCH [ target . core ] == 8 ):
320
- toolchain_name = "ARMC6"
328
+
329
+ toolchain_name = get_toolchain_name ( target , toolchain_name )
321
330
322
331
try :
323
332
cur_tc = TOOLCHAIN_CLASSES [toolchain_name ]
@@ -942,6 +951,8 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
942
951
Return - True if target + toolchain built correctly, False if not supported
943
952
"""
944
953
954
+ toolchain_name = get_toolchain_name (target , toolchain_name )
955
+
945
956
if report is not None :
946
957
start = time ()
947
958
id_name = "MBED"
0 commit comments