uARM targets now build in correct ARM_MICRO directory

This is for OS2 testing. Previously, targets that were configured with
the option "default_toolchain": "uARM" would still build to a
TOOLCHAIN_ARM_STD directory. This fixes these targets to build into
TOOLCHAIN_ARM_MICRO.
pull/9507/head
Brian Daniels 2019-01-08 17:51:31 -06:00 committed by adbridge
parent 2f371bd6bc
commit 97bf0d5cd3
1 changed files with 13 additions and 2 deletions

View File

@ -121,6 +121,15 @@ def add_result_to_report(report, result):
result_wrap = {0: result}
report[target][toolchain][id_name].append(result_wrap)
def get_toolchain_name(target, toolchain_name):
if toolchain_name == "ARM":
if CORE_ARCH[target.core] == 8:
return "ARMC6"
elif getattr(target, "default_toolchain", None) == "uARM":
return "uARM"
return toolchain_name
def get_config(src_paths, target, toolchain_name=None, app_config=None):
"""Get the configuration object for a target-toolchain combination
@ -316,8 +325,8 @@ def prepare_toolchain(src_paths, build_dir, target, toolchain_name,
raise NotSupportedException(
"Target {} is not supported by toolchain {}".format(
target.name, toolchain_name))
if (toolchain_name == "ARM" and CORE_ARCH[target.core] == 8):
toolchain_name = "ARMC6"
toolchain_name = get_toolchain_name(target, toolchain_name)
try:
cur_tc = TOOLCHAIN_CLASSES[toolchain_name]
@ -942,6 +951,8 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
Return - True if target + toolchain built correctly, False if not supported
"""
toolchain_name = get_toolchain_name(target, toolchain_name)
if report is not None:
start = time()
id_name = "MBED"