From 9383e02903200b02b312967c1517a3a0c5221f2b Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Mon, 15 May 2023 17:01:21 +0000 Subject: 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 Commit-Queue: Fabio Baltieri Reviewed-by: Robert Zieba --- util/ec_openocd.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'util/ec_openocd.py') 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) -- cgit v1.2.1