Skip to content

west: runners: Do not ignore --no-reset in command line or arguments #87138

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
Mar 19, 2025
Merged
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
18 changes: 9 additions & 9 deletions scripts/west_commands/run_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,17 @@ def do_run_common_image(command, user_args, user_runner_args, used_cmds,

i = i - 1

# Arguments in this order to allow specific to override general:
#
# - runner-specific runners.yaml arguments
# - user-provided command line arguments
final_argv = runners_yaml['args'][runner_name] + runner_args

# If flashing multiple images, the runner supports reset after flashing and
# the board has enabled this functionality, check if the board should be
# reset or not. If this is not specified in the board/soc file, leave it up to
# the runner's default configuration to decide if a reset should occur.
if runner_cls.capabilities().reset:
if runner_cls.capabilities().reset and '--no-reset' not in final_argv:
if board_image_count is not None:
reset = True

Expand Down Expand Up @@ -449,15 +455,9 @@ def do_run_common_image(command, user_args, user_runner_args, used_cmds,
break

if reset:
runner_args.append('--reset')
final_argv.append('--reset')
else:
runner_args.append('--no-reset')

# Arguments in this order to allow specific to override general:
#
# - runner-specific runners.yaml arguments
# - user-provided command line arguments
final_argv = runners_yaml['args'][runner_name] + runner_args
final_argv.append('--no-reset')

# 'user_args' contains parsed arguments which are:
#
Expand Down
Loading