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