Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: project.py
- Revision:
- 36:96847d42f010
- Parent:
- 35:da9c89f8be7d
- Child:
- 38:399953da035d
diff -r da9c89f8be7d -r 96847d42f010 project.py
--- a/project.py Wed Feb 15 13:53:18 2017 -0600
+++ b/project.py Thu Jun 22 11:12:28 2017 -0500
@@ -12,7 +12,7 @@
from tools.paths import EXPORT_DIR, MBED_HAL, MBED_LIBRARIES, MBED_TARGETS_PATH
from tools.settings import BUILD_DIR
-from tools.export import EXPORTERS, mcu_ide_matrix
+from tools.export import EXPORTERS, mcu_ide_matrix, mcu_ide_list, export_project, get_exporter_toolchain
from tools.tests import TESTS, TEST_MAP
from tools.tests import test_known, test_name_known, Test
from tools.targets import TARGET_NAMES
@@ -20,7 +20,6 @@
from tools.utils import argparse_force_lowercase_type
from tools.utils import argparse_force_uppercase_type
from tools.utils import print_large_string
-from tools.project_api import export_project, get_exporter_toolchain
from tools.options import extract_profile, list_profiles
def setup_project(ide, target, program=None, source_dir=None, build=None, export_path=None):
@@ -67,7 +66,8 @@
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:
@@ -91,7 +91,8 @@
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():
@@ -146,9 +147,11 @@
help="list available programs in order and exit")
group.add_argument("-S", "--list-matrix",
- action="store_true",
dest="supported_ides",
default=False,
+ const="matrix",
+ choices=["matrix", "ides"],
+ nargs="?",
help="displays supported matrix of MCUs and IDEs")
parser.add_argument("-E",
@@ -179,6 +182,9 @@
dest="update_packs",
action="store_true",
default=False)
+ parser.add_argument("--app-config",
+ dest="app_config",
+ default=None)
options = parser.parse_args()
@@ -189,7 +195,10 @@
# Only prints matrix of supported IDEs
if options.supported_ides:
- print_large_string(mcu_ide_matrix())
+ if options.supported_ides == "matrix":
+ print_large_string(mcu_ide_matrix())
+ elif options.supported_ides == "ides":
+ print mcu_ide_list()
exit(0)
# Only prints matrix of supported IDEs
@@ -241,7 +250,7 @@
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__":
