mirror of https://github.com/ARMmbed/mbed-os.git
Updating supported toolchain printing with new options
parent
1c31d365c2
commit
b94c4189b7
|
@ -1142,30 +1142,6 @@ def _lowercase_release_version(release_version):
|
|||
except AttributeError:
|
||||
return 'all'
|
||||
|
||||
def mcu_toolchain_list(release_version='5'):
|
||||
""" Shows list of toolchains
|
||||
|
||||
"""
|
||||
release_version = _lowercase_release_version(release_version)
|
||||
version_release_targets = {}
|
||||
version_release_target_names = {}
|
||||
|
||||
for version in RELEASE_VERSIONS:
|
||||
version_release_targets[version] = get_mbed_official_release(version)
|
||||
version_release_target_names[version] = [x[0] for x in
|
||||
version_release_targets[
|
||||
version]]
|
||||
|
||||
if release_version in RELEASE_VERSIONS:
|
||||
release_targets = version_release_targets[release_version]
|
||||
else:
|
||||
release_targets = None
|
||||
|
||||
unique_supported_toolchains = get_unique_supported_toolchains(
|
||||
release_targets)
|
||||
columns = ["mbed OS %s" % x for x in RELEASE_VERSIONS] + unique_supported_toolchains
|
||||
return "\n".join(columns)
|
||||
|
||||
|
||||
def mcu_target_list(release_version='5'):
|
||||
""" Shows target list
|
||||
|
|
|
@ -41,10 +41,10 @@ from tools.tests import test_known, test_name_known
|
|||
from tools.options import get_default_options_parser
|
||||
from tools.options import extract_profile
|
||||
from tools.options import extract_mcus
|
||||
from tools.options import get_toolchain_list
|
||||
from tools.notifier.term import TerminalNotifier
|
||||
from tools.build_api import build_project
|
||||
from tools.build_api import mcu_toolchain_matrix
|
||||
from tools.build_api import mcu_toolchain_list
|
||||
from tools.build_api import mcu_target_list
|
||||
from tools.build_api import merge_build_data
|
||||
from tools.build_api import find_valid_toolchain
|
||||
|
@ -297,11 +297,7 @@ def main():
|
|||
release_version=None
|
||||
))
|
||||
elif options.supported_toolchains == "toolchains":
|
||||
toolchain_list = mcu_toolchain_list()
|
||||
# Only print the lines that matter
|
||||
for line in toolchain_list.split("\n"):
|
||||
if "mbed" not in line:
|
||||
print(line)
|
||||
print('\n'.join(get_toolchain_list()))
|
||||
elif options.supported_toolchains == "targets":
|
||||
print(mcu_target_list())
|
||||
elif options.list_tests is True:
|
||||
|
|
|
@ -32,6 +32,12 @@ FLAGS_DEPRECATION_MESSAGE = "Please use the --profile argument instead.\n"\
|
|||
"Documentation may be found in "\
|
||||
"docs/Toolchain_Profiles.md"
|
||||
|
||||
def get_toolchain_list():
|
||||
toolchainlist = list(TOOLCHAINS)
|
||||
toolchainlist.extend(EXTRA_TOOLCHAIN_NAMES)
|
||||
toolchainlist.sort()
|
||||
return toolchainlist
|
||||
|
||||
def get_default_options_parser(add_clean=True, add_options=True,
|
||||
add_app_config=False):
|
||||
"""Create a new options parser with the default compiler options added
|
||||
|
@ -44,9 +50,7 @@ def get_default_options_parser(add_clean=True, add_options=True,
|
|||
|
||||
targetnames = TARGET_NAMES
|
||||
targetnames.sort()
|
||||
toolchainlist = list(TOOLCHAINS)
|
||||
toolchainlist.extend(EXTRA_TOOLCHAIN_NAMES)
|
||||
toolchainlist.sort()
|
||||
toolchainlist = get_toolchain_list()
|
||||
|
||||
parser.add_argument("-m", "--mcu",
|
||||
help=("build for the given MCU (%s)" %
|
||||
|
|
Loading…
Reference in New Issue