mbed-os/workspace_tools/options.py

23 lines
735 B
Python

from optparse import OptionParser
from workspace_tools.toolchains import TOOLCHAINS
from workspace_tools.targets import TARGET_NAMES
def get_default_options_parser():
parser = OptionParser()
parser.add_option("-m", "--mcu", dest="mcu",
help="build for the given MCU (%s)" % ', '.join(TARGET_NAMES),
metavar="MCU")
parser.add_option("-t", "--tool", dest="tool",
help="build using the given TOOLCHAIN (%s)" % ', '.join(TOOLCHAINS),
metavar="TOOLCHAIN")
parser.add_option("-c", "--clean",
action="store_true", dest="clean", default=False,
help="clean the build directory")
return parser