Add -S option to make.py to list all supported platforms

Mihail Stoyanov 2016-06-10 22:14:08 +01:00
parent 170268f156
commit 292fe9c0cf
2 changed files with 22 additions and 5 deletions

View File

@ -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)")

View File

@ -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) :