|
15 | 15 | from tools.tests import TESTS, TEST_MAP
|
16 | 16 | from tools.tests import test_known, test_name_known, Test
|
17 | 17 | from tools.targets import TARGET_NAMES
|
18 |
| -from tools.utils import argparse_filestring_type, argparse_many, args_error |
| 18 | +from tools.utils import argparse_filestring_type, argparse_profile_filestring_type, argparse_many, args_error |
19 | 19 | from tools.utils import argparse_force_lowercase_type
|
20 | 20 | from tools.utils import argparse_force_uppercase_type
|
21 | 21 | from tools.utils import print_large_string
|
22 | 22 | from tools.project_api import export_project, get_exporter_toolchain
|
23 |
| -from tools.options import extract_profile |
24 |
| - |
| 23 | +from tools.options import extract_profile, list_profiles |
25 | 24 |
|
26 | 25 | def setup_project(ide, target, program=None, source_dir=None, build=None, export_path=None):
|
27 | 26 | """Generate a name, if not provided, and find dependencies
|
@@ -172,10 +171,11 @@ def main():
|
172 | 171 | dest="macros",
|
173 | 172 | help="Add a macro definition")
|
174 | 173 |
|
175 |
| - parser.add_argument("--profile", |
176 |
| - type=argparse_filestring_type, |
177 |
| - default=[], |
178 |
| - help="Toolchain profile") |
| 174 | + parser.add_argument("--profile", dest="profile", action="append", |
| 175 | + type=argparse_profile_filestring_type, |
| 176 | + help="Build profile to use. Can be either path to json" \ |
| 177 | + "file or one of the default one ({})".format(", ".join(list_profiles())), |
| 178 | + default=[]) |
179 | 179 |
|
180 | 180 | parser.add_argument("--update-packs",
|
181 | 181 | dest="update_packs",
|
|
0 commit comments