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

Feature/vid pid map wildcard #1585

Merged

Conversation

perigoso
Copy link
Contributor

@perigoso perigoso commented Aug 2, 2023

Detailed description

Refactor done while rebasing #1399 which added a new probe type with no specified PID

While looking at this I got sidetracked into looking into the J-Link PIDs, discovering they have a whole meaning behind them, it seems they use them to list the USB Class interfaces the probe will have. I added this information to the protocol header, along with the masks and offsets required to interpret them, but did not implement anything with them, I don't think there's much value in parsing it for now, but might be useful later and serves at least as documentation

Test after the change:

$ blackmagic
Available Probes:
     Name                 Serial #                  Manufacturer              Version
  1. J-Link               000482212416              SEGGER                    ---
  2. J-Link OB            000440189254              Silicon Labs              ---
  3. Black Magic Probe    8BB20A03                  Black Magic Debug         v1.9.0-1095-g325a9414-dirty
$ blackmagic
No probes found

Your checklist for this pull request

  • I've read the Code of Conduct
  • I've read the guidelines for contributing to this repository
  • It builds for hardware native (make PROBE_HOST=native)
  • It builds as BMDA (make PROBE_HOST=hosted)
  • I've tested it to the best of my ability
  • My commit messages provide a useful short description of what the commits do

Closing issues

@perigoso perigoso force-pushed the feature/vid-pid-map-wildcard branch 2 times, most recently from 49c7dc4 to abd88ac Compare August 2, 2023 12:04
@dragonmux dragonmux added this to the v1.10 milestone Aug 2, 2023
@dragonmux dragonmux added Enhancement General project improvement BMD App Black Magic Debug App (aka. PC hosted) (not firmware) Documentation Project documentation labels Aug 2, 2023
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

LGTM, that's some nice work figuring out how the J-Link PIDs work!

We'll test this locally across BMP, ORBTrace, Tigard and a couple of kinds of ST-Link but this looks good so we don't expect any problems. We'll merge it as soon as we've done some testing on it.

Edit: one small problem that needs sorting, please prefix the commit messages with hosted/ as these are all in the BMDA platform

Integrate product id "wildcard" in vid pid map search
This information was extracted from the Jlink software suite for linux udev rules
@perigoso perigoso force-pushed the feature/vid-pid-map-wildcard branch from abd88ac to 0ab70a4 Compare August 2, 2023 13:39
@dragonmux
Copy link
Member

This all seems to function correctly, so merging.

@dragonmux dragonmux merged commit 4e708fc into blackmagic-debug:main Aug 3, 2023
@perigoso perigoso deleted the feature/vid-pid-map-wildcard branch August 3, 2023 09:19
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) Documentation Project documentation Enhancement General project improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants