From 1142c40c5ac8961b408d8912e53ada2d6b8eba33 Mon Sep 17 00:00:00 2001 From: Emilio Benavente Date: Mon, 2 Jun 2025 10:55:17 -0500 Subject: [PATCH] scripts: west_commands: runners: Update GDB args Update gdb arguments to enable linkserver debugging when app does not reset after load. This is useful for when the app is loading to ram. In this case if gdb reset after loaded the ram would be flushed when debugging and there would be nothing no image in ram to debug. Signed-off-by: Emilio Benavente --- scripts/west_commands/runners/linkserver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/west_commands/runners/linkserver.py b/scripts/west_commands/runners/linkserver.py index 3dadf497266..ae3c35e9b57 100644 --- a/scripts/west_commands/runners/linkserver.py +++ b/scripts/west_commands/runners/linkserver.py @@ -150,7 +150,10 @@ class LinkServerBinaryRunner(ZephyrBinaryRunner): ['-ex', f'target remote {self.gdb_host}:{self.gdb_port}']) if command == 'debug': - gdb_cmd += [ '-ex', 'load', '-ex', 'monitor reset'] + # If the flash node points to ram, linkserver treats + # the ram as inaccessible and does not flash. + gdb_cmd += ['-ex', 'set mem inaccessible-by-default off'] + gdb_cmd += ['-ex', 'monitor reset', '-ex', 'load'] if command == 'attach': linkserver_cmd += ['--attach']