Skip to content

Commit

Permalink
runner: linkerserver : remove the probe ID hardcode
Browse files Browse the repository at this point in the history
linkserver is hardcoded to probe ID, now with #70343 merged
the probe ID restriction can be removed.

(cherry picked from commit f419ea7)

Original-Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
GitOrigin-RevId: f419ea7
Change-Id: Ic330a9f5858a11108d385e2f59104952ffed4b37
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5402705
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
  • Loading branch information
hakehuang authored and Chromeos LUCI committed Mar 29, 2024
1 parent 520ab7c commit e2375d2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/west_commands/runners/linkserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LinkServerBinaryRunner(ZephyrBinaryRunner):
def __init__(self, cfg, device, core,
linkserver=DEFAULT_LINKSERVER_EXE,
dt_flash=True, erase=True,
probe=1,
probe='#1',
gdb_host='',
gdb_port=DEFAULT_LINKSERVER_GDB_PORT,
semihost_port=DEFAULT_LINKSERVER_SEMIHOST_PORT,
Expand Down Expand Up @@ -71,8 +71,8 @@ def do_add_parser(cls, parser):

parser.add_argument('--core', required=False, help='core of the device')

parser.add_argument('--probe', default=1,
help='interface to use (index, no serial number), default is 1')
parser.add_argument('--probe', default='#1',
help='interface to use (index, or serial number, default is #1')

parser.add_argument('--tui', default=False, action='store_true',
help='if given, GDB uses -tui')
Expand Down Expand Up @@ -169,7 +169,7 @@ def do_erase(self, **kwargs):
else:
_cmd_core = ""

linkserver_cmd = ([self.linkserver, "flash"] + ["--probe", "#"+str(self.probe)] +
linkserver_cmd = ([self.linkserver, "flash"] + ["--probe", str(self.probe)] +
[self.device+_cmd_core] + ["erase"])
self.logger.debug("flash erase command = " + str(linkserver_cmd))
self.check_call(linkserver_cmd)
Expand All @@ -191,7 +191,7 @@ def flash(self, **kwargs):
else:
_cmd_core = ""

linkserver_cmd = ([self.linkserver, "flash"] + ["--probe", "#"+str(self.probe)] + self.override_cli + [self.device+_cmd_core])
linkserver_cmd = ([self.linkserver, "flash"] + ["--probe", str(self.probe)] + self.override_cli + [self.device+_cmd_core])
self.logger.debug(f'LinkServer cmd: + {linkserver_cmd}')

if self.erase:
Expand Down

0 comments on commit e2375d2

Please sign in to comment.