Skip to content

Support app config option for export #4540

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 19, 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
5 changes: 3 additions & 2 deletions tools/export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
linker_script=None, notify=None, verbose=False, name=None,
inc_dirs=None, jobs=1, silent=False, extra_verbose=False,
config=None, macros=None, zip_proj=None, inc_repos=False,
build_profile=None):
build_profile=None, app_config=None):
"""Generates a project file and creates a zip archive if specified

Positional Arguments:
Expand Down Expand Up @@ -307,7 +307,8 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
toolchain = prepare_toolchain(
paths, "", target, toolchain_name, macros=macros, jobs=jobs,
notify=notify, silent=silent, verbose=verbose,
extra_verbose=extra_verbose, config=config, build_profile=build_profile)
extra_verbose=extra_verbose, config=config, build_profile=build_profile,
app_config=app_config)
# The first path will give the name to the library
if name is None:
name = basename(normpath(abspath(src_paths[0])))
Expand Down
11 changes: 8 additions & 3 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def setup_project(ide, target, program=None, source_dir=None, build=None, export


def export(target, ide, build=None, src=None, macros=None, project_id=None,
zip_proj=False, build_profile=None, export_path=None, silent=False):
zip_proj=False, build_profile=None, export_path=None, silent=False,
app_config=None):
"""Do an export of a project.

Positional arguments:
Expand All @@ -90,7 +91,8 @@ def export(target, ide, build=None, src=None, macros=None, project_id=None,

return export_project(src, project_dir, target, ide, name=name,
macros=macros, libraries_paths=lib, zip_proj=zip_name,
build_profile=build_profile, silent=silent)
build_profile=build_profile, silent=silent,
app_config=app_config)


def main():
Expand Down Expand Up @@ -180,6 +182,9 @@ def main():
dest="update_packs",
action="store_true",
default=False)
parser.add_argument("--app-config",
dest="app_config",
default=None)

options = parser.parse_args()

Expand Down Expand Up @@ -245,7 +250,7 @@ def main():
export(options.mcu, options.ide, build=options.build,
src=options.source_dir, macros=options.macros,
project_id=options.program, zip_proj=zip_proj,
build_profile=profile)
build_profile=profile, app_config=options.app_config)


if __name__ == "__main__":
Expand Down