workspace_tools/build.py: Check if given MCU and Toolchains are supported by the build system

pull/179/head
Olivier Martin 2014-02-19 23:57:45 +00:00
parent e6168cd496
commit 016053d21b
1 changed files with 6 additions and 0 deletions

View File

@ -58,12 +58,18 @@ if __name__ == '__main__':
# Get target list
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]
else:
targets = TARGET_NAMES
# Get toolchains list
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]
else:
toolchains = TOOLCHAINS