Skip to content

Commit

Permalink
commands: reset: fall back to reset via probe if context has no selec…
Browse files Browse the repository at this point in the history
…ted core (#1560)
  • Loading branch information
flit committed May 22, 2023
1 parent 1a61989 commit 4a8cbb7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyocd/commands/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,12 @@ def execute(self):
else:
self.context.write("Successfully halted device on reset")
else:
self.context.write("Resetting target")
self.context.selected_core.reset(self.reset_type)
if self.context.selected_core is None:
self.context.write("Resetting via probe")
self.context.probe.reset()
else:
self.context.write("Resetting target")
self.context.selected_core.reset(self.reset_type)

class DisassembleCommand(CommandBase):
INFO = {
Expand Down

0 comments on commit 4a8cbb7

Please sign in to comment.