@@ -2194,7 +2194,7 @@ def status_(ignore=False):
2194
2194
dict (name = ['-c' , '--clean' ], action = 'store_true' , help = 'Clean the build directory before compiling' ),
2195
2195
dict (name = ['-f' , '--flash' ], action = 'store_true' , help = 'Flash the built firmware onto a connected target.' ),
2196
2196
dict (name = ['-N' , '--artifact-name' ], help = 'Name of the built program or library' ),
2197
- dict (name = ['-S' , '--supported' ], dest = 'supported' , const = "matrix" , choices = ["matrix" , "toolchains" , "targets" ], nargs = "?" , help = 'Shows supported matrix of targets and toolchains' ),
2197
+ dict (name = ['-S' , '--supported' ], dest = 'supported' , const = True , choices = ["matrix" , "toolchains" , "targets" ], nargs = "?" , help = 'Shows supported matrix of targets and toolchains' ),
2198
2198
dict (name = '--app-config' , dest = "app_config" , help = "Path of an app configuration file (Default is to look for 'mbed_app.json')" ),
2199
2199
help = 'Compile code using the mbed build tools' ,
2200
2200
description = ("Compile this program using the mbed build tools." ))
@@ -2218,7 +2218,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2218
2218
2219
2219
if supported :
2220
2220
popen ([python_cmd , '-u' , os .path .join (tools_dir , 'make.py' )]
2221
- + (['-S' , supported ]) + (['-v' ] if very_verbose else [])
2221
+ + (['-S' , supported ] if ( supported is not True ) else [ '-S' ] ) + (['-v' ] if very_verbose else [])
2222
2222
+ (['--app-config' , app_config ] if app_config else [])
2223
2223
+ args ,
2224
2224
env = env )
@@ -2408,7 +2408,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
2408
2408
dict (name = ['-m' , '--target' ], help = 'Export for target MCU. Example: K64F, NUCLEO_F401RE, NRF51822...' ),
2409
2409
dict (name = '--source' , action = 'append' , help = 'Source directory. Default: . (current dir)' ),
2410
2410
dict (name = ['-c' , '--clean' ], action = 'store_true' , help = 'Clean the build directory before compiling' ),
2411
- dict (name = ['-S' , '--supported' ], dest = 'supported' , const = "matrix" , choices = [" matrix" , " ides" ], nargs = "?" , help = 'Shows supported matrix of targets and toolchains' ),
2411
+ dict (name = ['-S' , '--supported' ], dest = 'supported' , const = True , choices = [' matrix' , ' ides' ], nargs = '?' , help = 'Shows supported matrix of targets and toolchains' ),
2412
2412
dict (name = '--app-config' , dest = "app_config" , help = "Path of an app configuration file (Default is to look for 'mbed_app.json')" ),
2413
2413
help = 'Generate an IDE project' ,
2414
2414
description = (
@@ -2430,7 +2430,7 @@ def export(ide=None, target=None, source=False, clean=False, supported=False, ap
2430
2430
2431
2431
if supported :
2432
2432
popen ([python_cmd , '-u' , os .path .join (tools_dir , 'project.py' )]
2433
- + (['-S' , supported ] if supported else []) + (['-v' ] if very_verbose else []),
2433
+ + (['-S' , supported ] if ( supported is not True ) else ['-S' ]) + (['-v' ] if very_verbose else []),
2434
2434
env = env )
2435
2435
return
2436
2436
@@ -2574,7 +2574,7 @@ def config_(var=None, value=None, global_cfg=False, unset=False, list_config=Fal
2574
2574
"This is an alias to 'mbed config [--global] target [name]'\n " ))
2575
2575
def target_ (name = None , global_cfg = False , supported = False ):
2576
2576
if supported :
2577
- return compile_ (supported = 'matrix' )
2577
+ return compile_ (supported = supported )
2578
2578
return config_ ('target' , name , global_cfg = global_cfg )
2579
2579
2580
2580
@subcommand ('toolchain' ,
@@ -2587,7 +2587,7 @@ def target_(name=None, global_cfg=False, supported=False):
2587
2587
"This is an alias to 'mbed config [--global] toolchain [name]'\n " ))
2588
2588
def toolchain_ (name = None , global_cfg = False , supported = False ):
2589
2589
if supported :
2590
- return compile_ (supported = 'matrix' )
2590
+ return compile_ (supported = supported )
2591
2591
return config_ ('toolchain' , name , global_cfg = global_cfg )
2592
2592
2593
2593
@subcommand ('help' ,
0 commit comments