Skip to content

Commit b828faf

Browse files
committed
Merge pull request #179 from oliviermartin/om/build-added-error-msg
Added error message to build.py
2 parents 96dbf71 + 016053d commit b828faf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

workspace_tools/build.py

100644100755
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@
5858

5959
# Get target list
6060
if options.mcu:
61+
if options.mcu not in TARGET_NAMES:
62+
print "Given MCU '%s' not into the supported list:\n%s" % (options.mcu, TARGET_NAMES)
63+
sys.exit(1)
6164
targets = [options.mcu]
6265
else:
6366
targets = TARGET_NAMES
6467

6568
# Get toolchains list
6669
if options.tool:
70+
if options.tool not in TOOLCHAINS:
71+
print "Given toolchain '%s' not into the supported list:\n%s" % (options.tool, TOOLCHAINS)
72+
sys.exit(1)
6773
toolchains = [options.tool]
6874
else:
6975
toolchains = TOOLCHAINS

0 commit comments

Comments
 (0)