Skip to content

[Feature Request]: Refine connect failure error to indicate missing or undetected target #668

Closed

Description

@TeoMahnic

Description

Improve error message when a debug probe is connected but the target is not detected. Currently the pyOCD does not distinguish between a communication error during a debug session and a communication error on connect.

Current message on connect failure:

C SWD/JTAG communication failure (No ACK); check USB cable, reduce debugger clock [__main__]

Proposed message for error on connect failure:

Target not detected. Check connection to target.

Is this request a Security Requirement?

  • Yes

Priority

Low

Related Issues (Optional)

No response

Additional Notes (Optional)

No response

Activity

  1. self-assigned this
    on Nov 28, 2025
  2. added
    pyOCDChange is required in shipped pyOCD variant
    on Nov 28, 2025
  3. jreineckearm commented on Jan 14, 2026

    @jreineckearm
    Collaborator

    This is only about early DP ReadID, not all DAP accesses.

  4. ReinhardKeil commented on Jan 14, 2026

    @ReinhardKeil
    Collaborator

    I would add the hint to the debug clock speed. Proposed new message:

    Target not detected. Check connection to target. Potentially reduce debug clock speed.
    
  5. RobertRostohar commented on Oct 8, 2026

    @RobertRostohar
    Collaborator

    The original Critical message (C prefix) depends on probe used and also if debug sequences are used.

    We should therefore keep that message since it provides more context, convert it to an error (E prefix) and add the critical message "Target not detected" and exit.

    This would look like as the following examples:

    • STLink probe
    Image
    • CMSIS DAP without debug sequences
    Image
    • CMSIS DAP with debug sequences
    Image

    Basically, the first Error message (E) would be specific, but the second Critical message (C) would be the same indicating "Target not detected."

  6. ReinhardKeil commented on Oct 8, 2026

    @ReinhardKeil
    Collaborator

    @RobertRostohar I believe this is a good solution. Keep it this way.

  7. RobertRostohar commented on Oct 8, 2026

    @RobertRostohar
    Collaborator

    Implemented by pyocd/pyOCD#2045

  8. closed this as completedby moving to Done in CMSIS Debuggeron Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pyOCDChange is required in shipped pyOCD variant

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions