Skip to content

Commit c4a6163

Browse files
committed
Accept app config option for export
1 parent 744b95c commit c4a6163

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

tools/export/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
255255
linker_script=None, notify=None, verbose=False, name=None,
256256
inc_dirs=None, jobs=1, silent=False, extra_verbose=False,
257257
config=None, macros=None, zip_proj=None, inc_repos=False,
258-
build_profile=None):
258+
build_profile=None, app_config=None):
259259
"""Generates a project file and creates a zip archive if specified
260260
261261
Positional Arguments:
@@ -307,7 +307,8 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
307307
toolchain = prepare_toolchain(
308308
paths, "", target, toolchain_name, macros=macros, jobs=jobs,
309309
notify=notify, silent=silent, verbose=verbose,
310-
extra_verbose=extra_verbose, config=config, build_profile=build_profile)
310+
extra_verbose=extra_verbose, config=config, build_profile=build_profile,
311+
app_config=app_config)
311312
# The first path will give the name to the library
312313
if name is None:
313314
name = basename(normpath(abspath(src_paths[0])))

tools/project.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def setup_project(ide, target, program=None, source_dir=None, build=None, export
6666

6767

6868
def export(target, ide, build=None, src=None, macros=None, project_id=None,
69-
zip_proj=False, build_profile=None, export_path=None, silent=False):
69+
zip_proj=False, build_profile=None, export_path=None, silent=False,
70+
app_config=None):
7071
"""Do an export of a project.
7172
7273
Positional arguments:
@@ -90,7 +91,8 @@ def export(target, ide, build=None, src=None, macros=None, project_id=None,
9091

9192
return export_project(src, project_dir, target, ide, name=name,
9293
macros=macros, libraries_paths=lib, zip_proj=zip_name,
93-
build_profile=build_profile, silent=silent)
94+
build_profile=build_profile, silent=silent,
95+
app_config=app_config)
9496

9597

9698
def main():
@@ -180,6 +182,9 @@ def main():
180182
dest="update_packs",
181183
action="store_true",
182184
default=False)
185+
parser.add_argument("--app-config",
186+
dest="app_config",
187+
default=None)
183188

184189
options = parser.parse_args()
185190

@@ -245,7 +250,7 @@ def main():
245250
export(options.mcu, options.ide, build=options.build,
246251
src=options.source_dir, macros=options.macros,
247252
project_id=options.program, zip_proj=zip_proj,
248-
build_profile=profile)
253+
build_profile=profile, app_config=options.app_config)
249254

250255

251256
if __name__ == "__main__":

0 commit comments

Comments
 (0)