Skip to content

[Bug]: Debug is not always turned off on disconnect with pyOCD #103

@jreineckearm

Description

@jreineckearm

Summary

As the title says

Description

Embedded debuggers often turn off the debug logic in the target system on disconnect. For Cortex-M CPUs, this sets the target system running again.

With pyOCD, this doesn't always happen. Which leaves the target system in debug halt until manually resetting or power-cycling the debugged board.
This can be confusing for users migrating over to this solution. It gives the impression that the target application is broken.

We should consider to make this behavior optional for pyOCD. Or at least to prepare it so that we can easily add an option in future. There could be reasons for keeping the CPU in debug halt in future use cases where for example a debugger prepares the target and brings it into the right state before another tool is supposed to take over (maybe for secure debug authentication).

Steps to Reproduce

  1. Connect and disconnect from a board.
  2. If you for example try with a Blinky example, LEDs won't continue blinking as expected after disconnect.

Expected Behavior

Debug logic is turned off on final disconnect. And LED start blinking as expected for a Blinky-like example.

Additional Information

No response

Metadata

Metadata

Assignees

Labels

CDT GDB AdapterChange is required in the Eclipse CDT.cloud CDT GDB Adapter or its extension

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions