Skip to content

Commit fc5efdb

Browse files
Merge pull request #460 from mbartling/supported-lists
Supported lists
2 parents ed14f9e + 02348ce commit fc5efdb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mbed/mbed.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ def status_(ignore=False):
21692169
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
21702170
dict(name=['-f', '--flash'], action='store_true', help='Flash the built firmware onto a connected target.'),
21712171
dict(name=['-N', '--artifact-name'], help='Name of the built program or library'),
2172-
dict(name=['-S', '--supported'], dest='supported', action='store_true', help='Shows supported matrix of targets and toolchains'),
2172+
dict(name=['-S', '--supported'], dest='supported', const="matrix", choices=["matrix", "toolchains", "targets"], nargs="?", help='Shows supported matrix of targets and toolchains'),
21732173
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
21742174
help='Compile code using the mbed build tools',
21752175
description=("Compile this program using the mbed build tools."))
@@ -2192,8 +2192,8 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
21922192
source = [os.path.relpath(program.path, orig_path)]
21932193

21942194
if supported:
2195-
popen([python_cmd, '-u', os.path.join(tools_dir, 'make.py')]
2196-
+ (['-S'] if supported else []) + (['-v'] if very_verbose else [])
2195+
popen(['python', '-u', os.path.join(tools_dir, 'make.py')]
2196+
+ (['-S', supported] if supported else []) + (['-v'] if very_verbose else [])
21972197
+ (['--app-config', app_config] if app_config else [])
21982198
+ args,
21992199
env=env)
@@ -2383,7 +2383,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
23832383
dict(name=['-m', '--target'], help='Export for target MCU. Example: K64F, NUCLEO_F401RE, NRF51822...'),
23842384
dict(name='--source', action='append', help='Source directory. Default: . (current dir)'),
23852385
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
2386-
dict(name=['-S', '--supported'], dest='supported', action='store_true', help='Shows supported matrix of targets and toolchains'),
2386+
dict(name=['-S', '--supported'], dest='supported', const="matrix", choices=["matrix", "ides"], nargs="?", help='Shows supported matrix of targets and toolchains'),
23872387
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
23882388
help='Generate an IDE project',
23892389
description=(
@@ -2404,8 +2404,8 @@ def export(ide=None, target=None, source=False, clean=False, supported=False, ap
24042404
env = program.get_env()
24052405

24062406
if supported:
2407-
popen([python_cmd, '-u', os.path.join(tools_dir, 'project.py')]
2408-
+ (['-S'] if supported else []) + (['-v'] if very_verbose else []),
2407+
popen(['python', '-u', os.path.join(tools_dir, 'project.py')]
2408+
+ (['-S', supported] if supported else []) + (['-v'] if very_verbose else []),
24092409
env=env)
24102410
return
24112411

0 commit comments

Comments
 (0)