From 7b29b66bd5ff3370409444b36865c9fea7450dfe Mon Sep 17 00:00:00 2001 From: Yves Vandervennet Date: Mon, 28 Oct 2024 16:09:36 -0400 Subject: [PATCH] west: linkserver: change the default port number for semihost LinkServer manages port numbers for gdb and semihost as separate linear sequences when invoked to debug multi-core applications, e.g the gdb-server instance for cpu0 will have the default GDB port 3333 and the next gdb-server instance will be assigned the port 3334. The latter will conflict with the default port for semihost which is 3334. This patch changes the default port for semihost to 8888. Port numbers can be changed when invoking the linkserver runner. Signed-off-by: Yves Vandervennet --- scripts/west_commands/runners/linkserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/west_commands/runners/linkserver.py b/scripts/west_commands/runners/linkserver.py index 3e0baf9f605..f1a4630dd87 100644 --- a/scripts/west_commands/runners/linkserver.py +++ b/scripts/west_commands/runners/linkserver.py @@ -18,7 +18,7 @@ from runners.core import ZephyrBinaryRunner, RunnerCaps DEFAULT_LINKSERVER_EXE = 'Linkserver.exe' if sys.platform == 'win32' else 'LinkServer' DEFAULT_LINKSERVER_GDB_PORT = 3333 -DEFAULT_LINKSERVER_SEMIHOST_PORT = 3334 +DEFAULT_LINKSERVER_SEMIHOST_PORT = 8888 class LinkServerBinaryRunner(ZephyrBinaryRunner): '''Runner front-end for NXP Linkserver''' @@ -95,6 +95,7 @@ class LinkServerBinaryRunner(ZephyrBinaryRunner): @classmethod def do_create(cls, cfg, args): + print("RUNNER - gdb_port = " + str(args.gdb_port) + ", semih port = " + str(args.semihost_port)) return LinkServerBinaryRunner(cfg, args.device, args.core, linkserver=args.linkserver, dt_flash=args.dt_flash,