Skip to content

Commit d8d3219

Browse files
committed
Added list support to mbed compile
1 parent ed14f9e commit d8d3219

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mbed/mbed.py

Lines changed: 3 additions & 3 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)

0 commit comments

Comments
 (0)