Added multiple toolchain and MCU declarations for options -t and -m respectively. Names must be divided by comma.

pull/338/head
Przemek Wirkus 2014-05-30 14:49:19 +01:00
parent 97199bb372
commit 348c71f7f9
1 changed files with 23 additions and 19 deletions

View File

@ -58,19 +58,23 @@ if __name__ == '__main__':
# Get target list # Get target list
if options.mcu: if options.mcu:
if options.mcu not in TARGET_NAMES: mcu_list = (options.mcu).split(",")
print "Given MCU '%s' not into the supported list:\n%s" % (options.mcu, TARGET_NAMES) for mcu in mcu_list:
sys.exit(1) if mcu not in TARGET_NAMES:
targets = [options.mcu] print "Given MCU '%s' not into the supported list:\n%s" % (mcu, TARGET_NAMES)
sys.exit(1)
targets = mcu_list
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: toolchain_list = (options.tool).split(",")
print "Given toolchain '%s' not into the supported list:\n%s" % (options.tool, TOOLCHAINS) for tc in toolchain_list:
sys.exit(1) if tc not in TOOLCHAINS:
toolchains = [options.tool] print "Given toolchain '%s' not into the supported list:\n%s" % (tc, TOOLCHAINS)
sys.exit(1)
toolchains = toolchain_list
else: else:
toolchains = TOOLCHAINS toolchains = TOOLCHAINS