Skip to content

Restored mbed target --supported behavior #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,57 @@ test:
- cd .tests/bld-test/mbed && mbed update 85 --clean
- cd .tests/bld-test && mbed update --clean
- cd .tests/bld-test && mbed compile -m LPC1768 -j 0
- cd .tests && mbed new supported-tests
- |-
cd .tests/supported-tests
echo "Testing mbed-os-5.6.0"
mbed update --clean "mbed-os-5.6.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- |-
cd .tests/supported-tests
echo "Testing mbed-os-5.5.0"
mbed update --clean "mbed-os-5.5.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- |-
cd .tests/supported-tests
echo "Testing mbed-os-5.4.0"
mbed update --clean "mbed-os-5.4.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- |-
cd .tests/supported-tests
echo "Testing mbed-os-5.3.0"
mbed update --clean "mbed-os-5.3.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- |-
cd .tests/supported-tests
echo "Testing mbed-os-5.2.0"
mbed update --clean "mbed-os-5.2.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S
- |-
cd .tests/supported-tests
echo "Testing mbed-os-5.1.0"
mbed update --clean "mbed-os-5.1.0"
mbed compile -S
mbed toolchain -S
mbed target -S
mbed export -S



dependencies:
pre:
Expand Down
8 changes: 4 additions & 4 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,7 @@ def status_(ignore=False):
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
dict(name=['-f', '--flash'], action='store_true', help='Flash the built firmware onto a connected target.'),
dict(name=['-N', '--artifact-name'], help='Name of the built program or library'),
dict(name=['-S', '--supported'], dest='supported', const="matrix", choices=["matrix", "toolchains", "targets"], nargs="?", help='Shows supported matrix of targets and toolchains'),
dict(name=['-S', '--supported'], dest='supported', const=True, choices=["matrix", "toolchains", "targets"], nargs="?", help='Shows supported matrix of targets and toolchains'),
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
help='Compile code using the mbed build tools',
description=("Compile this program using the mbed build tools."))
Expand All @@ -2218,7 +2218,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,

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

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

Expand Down