diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2023-05-15 17:01:21 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-16 10:45:30 +0000 |
commit | 9383e02903200b02b312967c1517a3a0c5221f2b (patch) | |
tree | 76661cbf6b3c80b1feffaaca0e6a7dc2ef987494 /util | |
parent | 63912887ea09683d096023da58f996f53926eb78 (diff) | |
download | chrome-ec-9383e02903200b02b312967c1517a3a0c5221f2b.tar.gz |
ec_openocd: flip the logic for verify, change to --no-verify
The current verify option has to be used with --verify=0, which is a bit
unintuitive. Replace it with a --no-verify, or -n.
BUG=none
TEST=./util/ec_openocd.py --board rex flash -n
Change-Id: Ib2747c52b9a07c8ff3985dd0c7416331e2b042b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4534336
Tested-by: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Robert Zieba <robertzieba@google.com>
Diffstat (limited to 'util')
-rwxr-xr-x | util/ec_openocd.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/util/ec_openocd.py b/util/ec_openocd.py index 5da0479ed9..b8c9364bd8 100755 --- a/util/ec_openocd.py +++ b/util/ec_openocd.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 - # Copyright 2022 The ChromiumOS Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. + """ Flashes and debugs the EC through openocd """ @@ -123,7 +123,6 @@ def debug(interface, board, port, executable, attach): stderr=subprocess.STDOUT, preexec_fn=os.setsid, ) as openocd: - # Wait for OpenOCD to start, it'll open a port for GDB connections sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) connected = False @@ -237,10 +236,10 @@ def main(): ) flash_parser.set_defaults(command="flash") flash_parser.add_argument( - "--verify", - "-v", - default=True, - help="Verify flash after writing image, defaults to true", + "--no-verify", + "-n", + action="store_true", + help="Do not verify flash after writing image", ) debug_parser = sub_parsers.add_parser( @@ -279,7 +278,7 @@ def main(): image_file = ( get_flash_file(args.board) if target_file is None else target_file ) - flash(args.interface, args.board, image_file, args.verify) + flash(args.interface, args.board, image_file, not args.no_verify) elif args.command == "debug": executable_file = ( get_executable_file(args.board) |