Skip to content

Adding --app-config option to 'mbed export' #514

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 1 commit into from
Jun 21, 2017
Merged
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
6 changes: 4 additions & 2 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
+ (['-v'] if verbose else [])
+ args,
env=env)

if flash:
fw_name = artifact_name if artifact_name else program.name
fw_fbase = os.path.join(build_path, fw_name)
Expand Down Expand Up @@ -2375,10 +2375,11 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
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', action='store_true', 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=(
"Generate IDE project files for the current program."))
def export(ide=None, target=None, source=False, clean=False, supported=False):
def export(ide=None, target=None, source=False, clean=False, supported=False, app_config=None):
# Gather remaining arguments
args = remainder
# Find the root of the program
Expand Down Expand Up @@ -2416,6 +2417,7 @@ def export(ide=None, target=None, source=False, clean=False, supported=False):
+ ['-m', target]
+ (['-c'] if clean else [])
+ list(chain.from_iterable(izip(repeat('--source'), source)))
+ (['--app-config', app_config] if app_config else [])
+ args,
env=env)

Expand Down