mirror of https://github.com/ARMmbed/mbed-os.git
workspace_tools/build.py: Check if given MCU and Toolchains are supported by the build system
parent
e6168cd496
commit
016053d21b
|
@ -58,12 +58,18 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Get target list
|
# Get target list
|
||||||
if options.mcu:
|
if options.mcu:
|
||||||
|
if options.mcu not in TARGET_NAMES:
|
||||||
|
print "Given MCU '%s' not into the supported list:\n%s" % (options.mcu, TARGET_NAMES)
|
||||||
|
sys.exit(1)
|
||||||
targets = [options.mcu]
|
targets = [options.mcu]
|
||||||
else:
|
else:
|
||||||
targets = TARGET_NAMES
|
targets = TARGET_NAMES
|
||||||
|
|
||||||
# Get toolchains list
|
# Get toolchains list
|
||||||
if options.tool:
|
if options.tool:
|
||||||
|
if options.tool not in TOOLCHAINS:
|
||||||
|
print "Given toolchain '%s' not into the supported list:\n%s" % (options.tool, TOOLCHAINS)
|
||||||
|
sys.exit(1)
|
||||||
toolchains = [options.tool]
|
toolchains = [options.tool]
|
||||||
else:
|
else:
|
||||||
toolchains = TOOLCHAINS
|
toolchains = TOOLCHAINS
|
||||||
|
|
Loading…
Reference in New Issue