Lines Matching +full:cmake +full:- +full:ext
4 # SPDX-License-Identifier: Apache-2.0
35 sys.path.insert(0, str(ZEPHYR_SCRIPTS / 'dts' / 'python-devicetree' / 'src'))
41 # Context-sensitive help indentation.
45 IGNORED_RUN_ONCE_PRIORITY = -1
50 # Using level 1 allows sub-DEBUG levels of verbosity. The
54 # https://docs.python.org/3.7/library/logging.html#logging-levels.
60 log.inf('-- ' + msg, colorize=True)
121 # Remember to update west-completion.bash if you add or remove
127 group.add_argument('-d', '--build-dir', metavar='DIR',
131 group.add_argument('-c', '--cmake-cache', metavar='FILE',
133 group.add_argument('-r', '--runner',
134 help='override default runner from --build-dir')
135 group.add_argument('--skip-rebuild', action='store_true',
136 help='do not refresh cmake dependencies first')
137 group.add_argument('--domain', action='append',
148 Run "west {command.name} --context" for runner-specific options.
150 If a build directory is found, --context also prints per-runner
153 Use "west {command.name} --context -r RUNNER" to limit output to a
157 --hex-file. However, this depends on the runner: not all runners
158 respect --elf-file / --hex-file / --bin-file, nor use gdb or openocd,
160 group.add_argument('-H', '--context', action='store_true',
161 help='print runner- and build-specific help')
164 group.add_argument('--board-dir', metavar='DIR', help='board directory')
165 # FIXME: these are runner-specific and should be moved to where --context
167 group.add_argument('--gdb', help='path to GDB')
168 group.add_argument('--openocd', help='path to openocd')
170 '--openocd-search', metavar='DIR', action='append',
221 "using '--domain <domain>'")
239 # single-use commands in a dictionary so that they get executed
286 # For SoC-based qualifiers, prepend to the beginning of the
348 # If the user passed -- to force the parent argument parser to stop
350 runner_args = [arg for arg in user_runner_args if arg != '--']
356 i = len(runner_args) - 1
395 i = i - 1
406 … if cmd.command == '--reset' and (runner_name in cmd.runners or 'all' in cmd.runners):
435 runner_args.append('--reset')
437 runner_args.append('--no-reset')
441 # - runner-specific runners.yaml arguments
442 # - user-provided command line arguments
449 # 3. *not* runner-specific
458 # - parse 'final_argv' now that we have all the command line
460 # - create a RunnerConfig using 'user_args' and the result
474 # precedence, or e.g. --hex-file on the command line would be
475 # ignored in favor of a board.cmake setting.
510 guess = config.get('build', 'guess-dir', fallback='never')
517 msg = '--build-dir was not given, '
523 'build.dir-fmt configuration option')
533 log.die(f'no CMake cache found (expected one at {cache_file})')
541 log.die(f're-build in {args.build_dir} failed')
543 log.die(f're-build in {build_dir} failed (no --build-dir given)')
563 log.wrn(f'no pre-configured runners in {path}; '
583 board_cmake = Path(cache['BOARD_DIR']) / 'board.cmake'
585 board_cmake = 'board.cmake'
633 err = 'unknown --file-type ({}). Please use hex, bin or elf'
636 # file-type not provided, try to get from filename
639 ext = Path(file).suffix
640 if ext == ".hex":
642 if ext == ".bin":
644 if ext == ".elf":
647 # we couldn't get the file-type, set to
667 fd, name = tempfile.mkstemp(prefix='west-exc-', suffix='.txt')
674 # west {command} --context
680 log.wrn('no --build-dir given or found; output will be limited')
688 # Re-build unless asked not to, to make sure the output is up to date.
722 log.inf('Note: use -r RUNNER to limit information to one runner.')
747 # Print help text for class-specific command line options for the
806 log.inf(f'{INDENT}- {field}: {value}')
807 log.inf('runner-specific context:', colorize=True)
813 log.inf('Note: use -r RUNNER to limit information to one runner.')