[mbedmicro/pyOCD] Fix get_probe_with_id() for CMSIS-DAP (#621)

0 views
Skip to first unread message

Chris Reed

unread,
Apr 17, 2019, 11:21:01 AM4/17/19
to mbedmicro/pyOCD, Subscribed

Calling CMSISDAPProbe.get_probe_with_id() would always return an object even if there was no matching probe. This also caused the same method on DebugProbeAggregator to always return a CMSISDAPProbe even if the ID only matched an STLink.

Underlying this was original behaviour of DAPAccessCMSISDAP, where you could create an instance with any unique ID. It would only fail when you called open(). This patch changes this behaviour so it fails early. Attempting to construct a DAPAccessCMSISDAP with an unique ID that does not match a CMSIS-DAP interface will cause a DAPAccessIntf.DeviceError to be raised.

Another problem was in CMSISDAPProbe.get_probe_with_id(), where it always returned an instance even for invalid IDs. This specific behaviour broke DebugProbeAggregator.

Closes #617


You can view, comment on, or merge this pull request online at:

  https://github.com/mbedmicro/pyOCD/pull/621

Commit Summary

  • Fix get_probe_with_id() for CMSIS-DAP.

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Chris Reed

unread,
Apr 17, 2019, 11:21:07 AM4/17/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 18, 2019, 12:12:35 PM4/18/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 18, 2019, 7:51:11 PM4/18/19
to mbedmicro/pyOCD, Subscribed

Merged #621 into master.

Reply all
Reply to author
Forward
0 new messages