Skip to content

Commit 1142c40

Browse files
EmilioCBendkalowsk
authored andcommitted
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 <emilio.benavente@nxp.com>
1 parent 88e9518 commit 1142c40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/west_commands/runners/linkserver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ def do_run(self, command, **kwargs):
150150
['-ex', f'target remote {self.gdb_host}:{self.gdb_port}'])
151151

152152
if command == 'debug':
153-
gdb_cmd += [ '-ex', 'load', '-ex', 'monitor reset']
153+
# If the flash node points to ram, linkserver treats
154+
# the ram as inaccessible and does not flash.
155+
gdb_cmd += ['-ex', 'set mem inaccessible-by-default off']
156+
gdb_cmd += ['-ex', 'monitor reset', '-ex', 'load']
154157

155158
if command == 'attach':
156159
linkserver_cmd += ['--attach']

0 commit comments

Comments
 (0)