Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: CMSIS-DAP packet size handling #1731

Merged
merged 6 commits into from
Jan 14, 2024
Merged

Conversation

dragonmux
Copy link
Member

Detailed description

This PR fixes the way the CMSIS-DAP code handles adaptor packet sizing and the differences between HID and Bulk endpoint (v1 and v2) based firmware.

Tested working against ORBTrace and picoprobe (which is based directly on the ARM reference implementation).

This finally solves the mystery too of how the packet size and buffer interact with one another and the HIDAPI code, documenting this properly.

Your checklist for this pull request

Closing issues

@dragonmux dragonmux added Bug Confirmed bug Enhancement General project improvement BMD App Black Magic Debug App (aka. PC hosted) (not firmware) labels Jan 14, 2024
@dragonmux dragonmux added this to the v2.0 release milestone Jan 14, 2024
@dragonmux dragonmux force-pushed the fix/cmsis-dap-packet-size-handling branch from 0562c9f to 90749dc Compare January 14, 2024 02:17
@dragonmux dragonmux requested a review from esden January 14, 2024 03:03
@dragonmux dragonmux force-pushed the fix/cmsis-dap-packet-size-handling branch from 90749dc to 609cfc8 Compare January 14, 2024 03:39
Copy link
Member

@esden esden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just found one little oddness otherwise it looks good.

src/platforms/hosted/bmp_libusb.c Outdated Show resolved Hide resolved
@dragonmux dragonmux force-pushed the fix/cmsis-dap-packet-size-handling branch from 609cfc8 to 63dba12 Compare January 14, 2024 03:52
@esden esden self-requested a review January 14, 2024 03:56
Copy link
Member

@esden esden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esden esden merged commit 63dba12 into main Jan 14, 2024
17 checks passed
@dragonmux dragonmux deleted the fix/cmsis-dap-packet-size-handling branch January 14, 2024 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BMD App Black Magic Debug App (aka. PC hosted) (not firmware) Bug Confirmed bug Enhancement General project improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants