Browse Source

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>
pull/92715/head
Emilio Benavente 1 month ago committed by Dan Kalowsky
parent
commit
1142c40c5a
  1. 5
      scripts/west_commands/runners/linkserver.py

5
scripts/west_commands/runners/linkserver.py

@ -150,7 +150,10 @@ class LinkServerBinaryRunner(ZephyrBinaryRunner):
['-ex', f'target remote {self.gdb_host}:{self.gdb_port}']) ['-ex', f'target remote {self.gdb_host}:{self.gdb_port}'])
if command == 'debug': 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': if command == 'attach':
linkserver_cmd += ['--attach'] linkserver_cmd += ['--attach']

Loading…
Cancel
Save