Skip to content

Commit 694e45f

Browse files
authored
Merge pull request #9297 from bridadan/fix_os2_tests_uarm
uARM targets now build in correct ARM_MICRO directory
2 parents a1daecb + 9f340ed commit 694e45f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tools/build_api.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ def add_result_to_report(report, result):
121121
result_wrap = {0: result}
122122
report[target][toolchain][id_name].append(result_wrap)
123123

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+
124133
def get_config(src_paths, target, toolchain_name=None, app_config=None):
125134
"""Get the configuration object for a target-toolchain combination
126135
@@ -316,8 +325,8 @@ def prepare_toolchain(src_paths, build_dir, target, toolchain_name,
316325
raise NotSupportedException(
317326
"Target {} is not supported by toolchain {}".format(
318327
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)
321330

322331
try:
323332
cur_tc = TOOLCHAIN_CLASSES[toolchain_name]
@@ -942,6 +951,8 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
942951
Return - True if target + toolchain built correctly, False if not supported
943952
"""
944953

954+
toolchain_name = get_toolchain_name(target, toolchain_name)
955+
945956
if report is not None:
946957
start = time()
947958
id_name = "MBED"

0 commit comments

Comments
 (0)