Skip to content

Commit aeabe03

Browse files
authored
Merge pull request #514 from bridadan/export_app_config
Adding --app-config option to 'mbed export'
2 parents 6bf747a + eb7a19d commit aeabe03

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mbed/mbed.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
22522252
+ (['-v'] if verbose else [])
22532253
+ args,
22542254
env=env)
2255-
2255+
22562256
if flash:
22572257
fw_name = artifact_name if artifact_name else program.name
22582258
fw_fbase = os.path.join(build_path, fw_name)
@@ -2381,10 +2381,11 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
23812381
dict(name='--source', action='append', help='Source directory. Default: . (current dir)'),
23822382
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
23832383
dict(name=['-S', '--supported'], dest='supported', action='store_true', help='Shows supported matrix of targets and toolchains'),
2384+
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
23842385
help='Generate an IDE project',
23852386
description=(
23862387
"Generate IDE project files for the current program."))
2387-
def export(ide=None, target=None, source=False, clean=False, supported=False):
2388+
def export(ide=None, target=None, source=False, clean=False, supported=False, app_config=None):
23882389
# Gather remaining arguments
23892390
args = remainder
23902391
# Find the root of the program
@@ -2422,6 +2423,7 @@ def export(ide=None, target=None, source=False, clean=False, supported=False):
24222423
+ ['-m', target]
24232424
+ (['-c'] if clean else [])
24242425
+ list(chain.from_iterable(izip(repeat('--source'), source)))
2426+
+ (['--app-config', app_config] if app_config else [])
24252427
+ args,
24262428
env=env)
24272429

0 commit comments

Comments
 (0)