Skip to content

Commit eb7a19d

Browse files
committed
Adding --app-config option to 'mbed export'
1 parent 5cbf7ea commit eb7a19d

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
@@ -2246,7 +2246,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
22462246
+ (['-v'] if verbose else [])
22472247
+ args,
22482248
env=env)
2249-
2249+
22502250
if flash:
22512251
fw_name = artifact_name if artifact_name else program.name
22522252
fw_fbase = os.path.join(build_path, fw_name)
@@ -2375,10 +2375,11 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
23752375
dict(name='--source', action='append', help='Source directory. Default: . (current dir)'),
23762376
dict(name=['-c', '--clean'], action='store_true', help='Clean the build directory before compiling'),
23772377
dict(name=['-S', '--supported'], dest='supported', action='store_true', help='Shows supported matrix of targets and toolchains'),
2378+
dict(name='--app-config', dest="app_config", help="Path of an app configuration file (Default is to look for 'mbed_app.json')"),
23782379
help='Generate an IDE project',
23792380
description=(
23802381
"Generate IDE project files for the current program."))
2381-
def export(ide=None, target=None, source=False, clean=False, supported=False):
2382+
def export(ide=None, target=None, source=False, clean=False, supported=False, app_config=None):
23822383
# Gather remaining arguments
23832384
args = remainder
23842385
# Find the root of the program
@@ -2416,6 +2417,7 @@ def export(ide=None, target=None, source=False, clean=False, supported=False):
24162417
+ ['-m', target]
24172418
+ (['-c'] if clean else [])
24182419
+ list(chain.from_iterable(izip(repeat('--source'), source)))
2420+
+ (['--app-config', app_config] if app_config else [])
24192421
+ args,
24202422
env=env)
24212423

0 commit comments

Comments
 (0)