mirror of https://github.com/ARMmbed/mbed-os.git
commit
b8c64cd275
|
@ -282,6 +282,16 @@ def build_library(src_paths, build_path, target, toolchain_name,
|
|||
# We will use default project name based on project folder name
|
||||
name = project_name
|
||||
|
||||
# If the configuration object was not yet created, create it now
|
||||
config = Config(target, src_paths)
|
||||
|
||||
# If the 'target' argument is a string, convert it to a target instance
|
||||
if isinstance(target, str):
|
||||
try:
|
||||
target = TARGET_MAP[target]
|
||||
except KeyError:
|
||||
raise KeyError("Target '%s' not found" % target)
|
||||
|
||||
if report != None:
|
||||
start = time()
|
||||
|
||||
|
@ -355,9 +365,6 @@ def build_library(src_paths, build_path, target, toolchain_name,
|
|||
else:
|
||||
tmp_path = build_path
|
||||
|
||||
# Handle configuration
|
||||
config = Config(target)
|
||||
|
||||
# Load resources into the config system which might expand/modify resources based on config data
|
||||
resources = config.load_resources(resources)
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ if __name__ == '__main__':
|
|||
base_source_paths = ['.']
|
||||
|
||||
|
||||
target = TARGET_MAP[options.mcu]
|
||||
target = options.mcu
|
||||
|
||||
build_report = {}
|
||||
build_properties = {}
|
||||
|
|
|
@ -2031,8 +2031,10 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
|
|||
|
||||
base_path = norm_relative_path(build_path, execution_directory)
|
||||
|
||||
target_name = target if isinstance(target, str) else target.name
|
||||
|
||||
test_build = {
|
||||
"platform": target.name,
|
||||
"platform": target_name,
|
||||
"toolchain": toolchain_name,
|
||||
"base_path": base_path,
|
||||
"baud_rate": 9600,
|
||||
|
@ -2086,7 +2088,7 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
|
|||
print 'Image: %s'% bin_file
|
||||
|
||||
test_builds = {}
|
||||
test_builds["%s-%s" % (target.name, toolchain_name)] = test_build
|
||||
test_builds["%s-%s" % (target_name, toolchain_name)] = test_build
|
||||
|
||||
|
||||
return result, test_builds
|
||||
|
|
Loading…
Reference in New Issue