mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Merge pull request #10347 from bridadan/allow_mbed_2_builds
Fix detection of supported targets for mbed 2 buildspull/10363/head
						commit
						bb0baee381
					
				| 
						 | 
					@ -6650,7 +6650,7 @@
 | 
				
			||||||
            "TC_ASYNC=true"
 | 
					            "TC_ASYNC=true"
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        "extra_labels": ["Atmel", "SAM_CortexM0P", "SAMR21"],
 | 
					        "extra_labels": ["Atmel", "SAM_CortexM0P", "SAMR21"],
 | 
				
			||||||
        "supported_toolchains": ["GCC_ARM", "ARM", "uARM"],
 | 
					        "supported_toolchains": ["GCC_ARM", "ARMC5", "uARM"],
 | 
				
			||||||
        "device_has": [
 | 
					        "device_has": [
 | 
				
			||||||
            "ANALOGIN",
 | 
					            "ANALOGIN",
 | 
				
			||||||
            "I2C",
 | 
					            "I2C",
 | 
				
			||||||
| 
						 | 
					@ -6683,7 +6683,7 @@
 | 
				
			||||||
            "TC_ASYNC=true"
 | 
					            "TC_ASYNC=true"
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        "extra_labels": ["Atmel", "SAM_CortexM0P", "SAMD21"],
 | 
					        "extra_labels": ["Atmel", "SAM_CortexM0P", "SAMD21"],
 | 
				
			||||||
        "supported_toolchains": ["GCC_ARM", "ARM", "uARM"],
 | 
					        "supported_toolchains": ["GCC_ARM", "ARMC5", "uARM"],
 | 
				
			||||||
        "device_has": [
 | 
					        "device_has": [
 | 
				
			||||||
            "ANALOGIN",
 | 
					            "ANALOGIN",
 | 
				
			||||||
            "ANALOGOUT",
 | 
					            "ANALOGOUT",
 | 
				
			||||||
| 
						 | 
					@ -6717,7 +6717,7 @@
 | 
				
			||||||
            "TC_ASYNC=true"
 | 
					            "TC_ASYNC=true"
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        "extra_labels": ["Atmel", "SAM_CortexM0P", "SAMD21"],
 | 
					        "extra_labels": ["Atmel", "SAM_CortexM0P", "SAMD21"],
 | 
				
			||||||
        "supported_toolchains": ["GCC_ARM", "ARM", "uARM"],
 | 
					        "supported_toolchains": ["GCC_ARM", "ARMC5", "uARM"],
 | 
				
			||||||
        "device_has": [
 | 
					        "device_has": [
 | 
				
			||||||
            "ANALOGIN",
 | 
					            "ANALOGIN",
 | 
				
			||||||
            "ANALOGOUT",
 | 
					            "ANALOGOUT",
 | 
				
			||||||
| 
						 | 
					@ -6751,7 +6751,7 @@
 | 
				
			||||||
            "TC_ASYNC=true"
 | 
					            "TC_ASYNC=true"
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        "extra_labels": ["Atmel", "SAM_CortexM0P", "SAML21"],
 | 
					        "extra_labels": ["Atmel", "SAM_CortexM0P", "SAML21"],
 | 
				
			||||||
        "supported_toolchains": ["GCC_ARM", "ARM", "uARM"],
 | 
					        "supported_toolchains": ["GCC_ARM", "ARMC5", "uARM"],
 | 
				
			||||||
        "device_has": [
 | 
					        "device_has": [
 | 
				
			||||||
            "ANALOGIN",
 | 
					            "ANALOGIN",
 | 
				
			||||||
            "ANALOGOUT",
 | 
					            "ANALOGOUT",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -182,9 +182,8 @@ def main():
 | 
				
			||||||
            except NoValidToolchainException as e:
 | 
					            except NoValidToolchainException as e:
 | 
				
			||||||
                print_end_warnings(e.end_warnings)
 | 
					                print_end_warnings(e.end_warnings)
 | 
				
			||||||
                args_error(parser, str(e))
 | 
					                args_error(parser, str(e))
 | 
				
			||||||
 | 
					 | 
				
			||||||
            tt_id = "%s::%s" % (internal_tc_name, target_name)
 | 
					            tt_id = "%s::%s" % (internal_tc_name, target_name)
 | 
				
			||||||
            if not target_supports_toolchain(target, toolchain):
 | 
					            if not target_supports_toolchain(target, toolchain_name):
 | 
				
			||||||
                # Log this later
 | 
					                # Log this later
 | 
				
			||||||
                print("%s skipped: toolchain not supported" % tt_id)
 | 
					                print("%s skipped: toolchain not supported" % tt_id)
 | 
				
			||||||
                skipped.append(tt_id)
 | 
					                skipped.append(tt_id)
 | 
				
			||||||
| 
						 | 
					@ -196,7 +195,6 @@ def main():
 | 
				
			||||||
                    if target.is_PSA_secure_target and \
 | 
					                    if target.is_PSA_secure_target and \
 | 
				
			||||||
                            not is_relative_to_root(options.source_dir):
 | 
					                            not is_relative_to_root(options.source_dir):
 | 
				
			||||||
                        options.source_dir = ROOT
 | 
					                        options.source_dir = ROOT
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    if options.source_dir:
 | 
					                    if options.source_dir:
 | 
				
			||||||
                        lib_build_res = build_library(
 | 
					                        lib_build_res = build_library(
 | 
				
			||||||
                            options.source_dir, options.build_dir, target, toolchain_name,
 | 
					                            options.source_dir, options.build_dir, target, toolchain_name,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -988,7 +988,6 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
 | 
				
			||||||
    #then set the default_toolchain to uARM to link AC6 microlib.
 | 
					    #then set the default_toolchain to uARM to link AC6 microlib.
 | 
				
			||||||
    if(selected_toolchain_name == "ARMC6" and toolchain_name == "uARM"):
 | 
					    if(selected_toolchain_name == "ARMC6" and toolchain_name == "uARM"):
 | 
				
			||||||
        target.default_toolchain = "uARM"
 | 
					        target.default_toolchain = "uARM"
 | 
				
			||||||
    toolchain_name = selected_toolchain_name
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if report is not None:
 | 
					    if report is not None:
 | 
				
			||||||
        start = time()
 | 
					        start = time()
 | 
				
			||||||
| 
						 | 
					@ -1003,7 +1002,7 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
 | 
				
			||||||
            prep_properties(
 | 
					            prep_properties(
 | 
				
			||||||
                properties, target.name, toolchain_name, vendor_label)
 | 
					                properties, target.name, toolchain_name, vendor_label)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if toolchain_name not in target.supported_toolchains:
 | 
					    if not target_supports_toolchain(target, toolchain_name):
 | 
				
			||||||
        supported_toolchains_text = ", ".join(target.supported_toolchains)
 | 
					        supported_toolchains_text = ", ".join(target.supported_toolchains)
 | 
				
			||||||
        notify.info('The target {} does not support the toolchain {}'.format(
 | 
					        notify.info('The target {} does not support the toolchain {}'.format(
 | 
				
			||||||
            target.name,
 | 
					            target.name,
 | 
				
			||||||
| 
						 | 
					@ -1023,14 +1022,16 @@ def build_mbed_libs(target, toolchain_name, clean=False, macros=None,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        # Source and Build Paths
 | 
					        # Source and Build Paths
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        build_toolchain = join(
 | 
					        build_toolchain = join(
 | 
				
			||||||
            MBED_LIBRARIES, mbed2_obj_path(target.name, toolchain_name))
 | 
					            MBED_LIBRARIES, mbed2_obj_path(target.name, selected_toolchain_name)
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
        mkdir(build_toolchain)
 | 
					        mkdir(build_toolchain)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        tmp_path = join(
 | 
					        tmp_path = join(
 | 
				
			||||||
            MBED_LIBRARIES,
 | 
					            MBED_LIBRARIES,
 | 
				
			||||||
            '.temp',
 | 
					            '.temp',
 | 
				
			||||||
            mbed2_obj_path(target.name, toolchain_name)
 | 
					            mbed2_obj_path(target.name, selected_toolchain_name)
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        mkdir(tmp_path)
 | 
					        mkdir(tmp_path)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue