Skip to content

Commit 578fa73

Browse files
Merge pull request #572 from cmonr/issue_557
Restored `mbed target --supported` behavior
2 parents 52f3cbb + 167b263 commit 578fa73

File tree

2 files changed

+55
-4
lines changed

2 files changed

+55
-4
lines changed

circle.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,57 @@ test:
2222
- cd .tests/bld-test/mbed && mbed update 85 --clean
2323
- cd .tests/bld-test && mbed update --clean
2424
- cd .tests/bld-test && mbed compile -m LPC1768 -j 0
25+
- cd .tests && mbed new supported-tests
26+
- |-
27+
cd .tests/supported-tests
28+
echo "Testing mbed-os-5.6.0"
29+
mbed update --clean "mbed-os-5.6.0"
30+
mbed compile -S
31+
mbed toolchain -S
32+
mbed target -S
33+
mbed export -S
34+
- |-
35+
cd .tests/supported-tests
36+
echo "Testing mbed-os-5.5.0"
37+
mbed update --clean "mbed-os-5.5.0"
38+
mbed compile -S
39+
mbed toolchain -S
40+
mbed target -S
41+
mbed export -S
42+
- |-
43+
cd .tests/supported-tests
44+
echo "Testing mbed-os-5.4.0"
45+
mbed update --clean "mbed-os-5.4.0"
46+
mbed compile -S
47+
mbed toolchain -S
48+
mbed target -S
49+
mbed export -S
50+
- |-
51+
cd .tests/supported-tests
52+
echo "Testing mbed-os-5.3.0"
53+
mbed update --clean "mbed-os-5.3.0"
54+
mbed compile -S
55+
mbed toolchain -S
56+
mbed target -S
57+
mbed export -S
58+
- |-
59+
cd .tests/supported-tests
60+
echo "Testing mbed-os-5.2.0"
61+
mbed update --clean "mbed-os-5.2.0"
62+
mbed compile -S
63+
mbed toolchain -S
64+
mbed target -S
65+
mbed export -S
66+
- |-
67+
cd .tests/supported-tests
68+
echo "Testing mbed-os-5.1.0"
69+
mbed update --clean "mbed-os-5.1.0"
70+
mbed compile -S
71+
mbed toolchain -S
72+
mbed target -S
73+
mbed export -S
74+
75+
2576
2677
dependencies:
2778
pre:

mbed/mbed.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,7 +2256,7 @@ def status_(ignore=False):
22562256
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
22572257
dict(name=['-f', '--flash'], action='store_true', help='Flash the built firmware onto a connected target.'),
22582258
dict(name=['-N', '--artifact-name'], help='Name of the built program or library'),
2259-
dict(name=['-S', '--supported'], dest='supported', const="matrix", choices=["matrix", "toolchains", "targets"], nargs="?", help='Shows supported matrix of targets and toolchains'),
2259+
dict(name=['-S', '--supported'], dest='supported', const=True, choices=["matrix", "toolchains", "targets"], nargs="?", help='Shows supported matrix of targets and toolchains'),
22602260
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
22612261
help='Compile code using the mbed build tools',
22622262
description=("Compile this program using the mbed build tools."))
@@ -2280,7 +2280,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
22802280

22812281
if supported:
22822282
popen([python_cmd, '-u', os.path.join(tools_dir, 'make.py')]
2283-
+ (['-S', supported] if supported else []) + (['-v'] if very_verbose else [])
2283+
+ (['-S', supported] if (supported is not True) else ['-S']) + (['-v'] if very_verbose else [])
22842284
+ (['--app-config', app_config] if app_config else [])
22852285
+ args,
22862286
env=env)
@@ -2470,7 +2470,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
24702470
dict(name=['-m', '--target'], help='Export for target MCU. Example: K64F, NUCLEO_F401RE, NRF51822...'),
24712471
dict(name='--source', action='append', help='Source directory. Default: . (current dir)'),
24722472
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
2473-
dict(name=['-S', '--supported'], dest='supported', const="matrix", choices=["matrix", "ides"], nargs="?", help='Shows supported matrix of targets and toolchains'),
2473+
dict(name=['-S', '--supported'], dest='supported', const=True, choices=['matrix', 'ides'], nargs='?', help='Shows supported matrix of targets and toolchains'),
24742474
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
24752475
help='Generate an IDE project',
24762476
description=(
@@ -2492,7 +2492,7 @@ def export(ide=None, target=None, source=False, clean=False, supported=False, ap
24922492

24932493
if supported:
24942494
popen([python_cmd, '-u', os.path.join(tools_dir, 'project.py')]
2495-
+ (['-S', supported] if supported else []) + (['-v'] if very_verbose else []),
2495+
+ (['-S', supported] if (supported is not True) else ['-S']) + (['-v'] if very_verbose else []),
24962496
env=env)
24972497
return
24982498

0 commit comments

Comments
 (0)