"--mcu", metavar="MCU", default='LPC1768', help="generate project for the given MCU (%s)" % ', '.join(TARGET_NAMES)) parser.add_option("-p", type="int", dest="program", help="The index of the desired test program: [0-%d]" % (len(TESTS) - 1)) parser.add_option("-i", dest="ide", default='uvision', help="The target IDE: %s" % str(EXPORTERS.keys())) parser.add_option( "-b", dest="build", action="store_true", default=False, help="Use the mbed library build, instead of the sources") (options, args) = parser.parse_args() # Target if options.mcu is None: args_error(parser, "[ERROR] You should specify an MCU") mcu = options.mcu
from workspace_tools.targets import TARGET_NAMES from workspace_tools.libraries import LIBRARIES try: import workspace_tools.private_settings as ps except: ps = object() if __name__ == '__main__': # Parse Options parser = OptionParser() targetnames = TARGET_NAMES targetnames.sort() toolchainlist = EXPORTERS.keys() toolchainlist.sort() parser.add_option("-m", "--mcu", metavar="MCU", default='LPC1768', help="generate project for the given MCU (%s)"% ', '.join(targetnames)) parser.add_option("-i", dest="ide", default='uvision', help="The target IDE: %s"% str(toolchainlist)) parser.add_option("-c", "--clean", action="store_true", default=False,
from workspace_tools.tests import TESTS, Test, TEST_MAP from workspace_tools.targets import TARGET_NAMES if __name__ == '__main__': # Parse Options parser = OptionParser() parser.add_option("-m", "--mcu", metavar="MCU", default='LPC1768', help="generate project for the given MCU (%s)" % ', '.join(TARGET_NAMES)) parser.add_option("-p", type="int", dest="program", help="The index of the desired test program: [0-%d]" % (len(TESTS)-1)) parser.add_option("-i", dest="ide", default='uvision', help="The target IDE: %s" % str(EXPORTERS.keys())) parser.add_option("-b", dest="build", action="store_true", default=False, help="Use the mbed library build, instead of the sources") (options, args) = parser.parse_args() # Target if options.mcu is None : args_error(parser, "[ERROR] You should specify an MCU") mcu = options.mcu # IDE if options.ide is None: args_error(parser, "[ERROR] You should specify an IDE") ide = options.ide
# Parse Options parser = OptionParser() parser.add_option( "-m", "--mcu", metavar="MCU", default="LPC1768", help="generate project for the given MCU (%s)" % ", ".join(TARGET_NAMES), ) parser.add_option( "-p", type="int", dest="program", help="The index of the desired test program: [0-%d]" % (len(TESTS) - 1) ) parser.add_option("-i", dest="ide", default="uvision", help="The target IDE: %s" % str(EXPORTERS.keys())) parser.add_option( "-b", dest="build", action="store_true", default=False, help="Use the mbed library build, instead of the sources", ) (options, args) = parser.parse_args() # Target if options.mcu is None: args_error(parser, "[ERROR] You should specify an MCU") mcu = options.mcu