diff --git a/tools/build.py b/tools/build.py index 6fb01df532..6b5766efd2 100755 --- a/tools/build.py +++ b/tools/build.py @@ -116,17 +116,17 @@ if __name__ == '__main__': default=False, help="Displays supported matrix of MCUs and toolchains") + parser.add_option('-f', '--filter', + dest='general_filter_regex', + default=None, + help='For some commands you can use filter to filter out results') + parser.add_option("", "--cppcheck", action="store_true", dest="cppcheck_validation", default=False, help="Forces 'cppcheck' static code analysis") - parser.add_option('-f', '--filter', - dest='general_filter_regex', - default=None, - help='For some commands you can use filter to filter out results') - parser.add_option("-j", "--jobs", type="int", dest="jobs", default=0, help="Number of concurrent jobs. Default: 0/auto (based on host machine's number of CPUs)") diff --git a/tools/make.py b/tools/make.py index 1d081b5cc5..7bc749985e 100755 --- a/tools/make.py +++ b/tools/make.py @@ -41,6 +41,7 @@ from tools.tests import TEST_MBED_LIB from tools.targets import TARGET_MAP from tools.options import get_default_options_parser from tools.build_api import build_project +from tools.build_api import mcu_toolchain_matrix try: import tools.private_settings as ps except: @@ -81,6 +82,17 @@ if __name__ == '__main__': dest="macros", help="Add a macro definition") + parser.add_option("-S", "--supported-toolchains", + action="store_true", + dest="supported_toolchains", + default=False, + help="Displays supported matrix of MCUs and toolchains") + + parser.add_option('-f', '--filter', + dest='general_filter_regex', + default=None, + help='For some commands you can use filter to filter out results') + # Local run parser.add_option("--automated", action="store_true", dest="automated", default=False, help="Automated test") @@ -166,6 +178,11 @@ if __name__ == '__main__': (options, args) = parser.parse_args() + # Only prints matrix of supported toolchains + if options.supported_toolchains: + print mcu_toolchain_matrix(platform_filter=options.general_filter_regex) + exit(0) + if options.source_dir: for path in options.source_dir : if not isfile(path) and not isdir(path) :