mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #61 from 0xc0170/fix_#59
Fixes #59 - build and make - handle toolchain/target name errors
commit
0a14cc45c0
|
@ -83,7 +83,11 @@ def build_project(src_path, build_path, target, toolchain_name,
|
|||
""" This function builds project. Project can be for example one test / UT
|
||||
"""
|
||||
# Toolchain instance
|
||||
try:
|
||||
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||
except KeyError as e:
|
||||
raise KeyError("Toolchain %s not supported" % toolchain_name)
|
||||
|
||||
toolchain.VERBOSE = verbose
|
||||
toolchain.jobs = jobs
|
||||
toolchain.build_all = clean
|
||||
|
|
|
@ -240,7 +240,12 @@ if __name__ == '__main__':
|
|||
if options.build_dir is not None:
|
||||
build_dir = options.build_dir
|
||||
|
||||
try:
|
||||
target = TARGET_MAP[mcu]
|
||||
except KeyError:
|
||||
print "[ERROR] Target %s not supported" % mcu
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
bin_file = build_project(test.source_dir, build_dir, target, toolchain, test.dependencies, options.options,
|
||||
linker_script=options.linker_script,
|
||||
|
|
Loading…
Reference in New Issue