From 016053d21bddccbb7c0507d835db3c3d86f566ec Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Wed, 19 Feb 2014 23:57:45 +0000 Subject: [PATCH] workspace_tools/build.py: Check if given MCU and Toolchains are supported by the build system --- workspace_tools/build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workspace_tools/build.py b/workspace_tools/build.py index f3644ba118..de0dd705b4 100755 --- a/workspace_tools/build.py +++ b/workspace_tools/build.py @@ -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