Skip to content

Commit

Permalink
west debugserver: openocd: configure rtos
Browse files Browse the repository at this point in the history
This enables thread awareness in the spawned OpenOCD server.

Signed-off-by: Bruno Mendes <[email protected]>
  • Loading branch information
bdmendes authored and MaureenHelm committed Jul 27, 2023
1 parent 724a5cd commit 7da7742
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/west_commands/runners/openocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,11 @@ def do_debugserver(self, **kwargs):
pre_init_cmd.append("-c")
pre_init_cmd.append(i)

if self.thread_info_enabled and self.supports_thread_info():
pre_init_cmd.append("-c")
rtos_command = '${} configure -rtos Zephyr'.format(self.target_handle)
pre_init_cmd.append(rtos_command)

cmd = (self.openocd_cmd + self.cfg_cmd +
['-c', 'tcl_port {}'.format(self.tcl_port),
'-c', 'telnet_port {}'.format(self.telnet_port),
Expand Down

0 comments on commit 7da7742

Please sign in to comment.