diff --git a/src/platforms/hosted/bmp_libusb.c b/src/platforms/hosted/bmp_libusb.c index 6291d35d8c7..d085dc33d25 100644 --- a/src/platforms/hosted/bmp_libusb.c +++ b/src/platforms/hosted/bmp_libusb.c @@ -71,11 +71,16 @@ debugger_device_s debugger_devices[] = { bmp_type_t get_type_from_vid_pid(const uint16_t probe_vid, const uint16_t probe_pid) { bmp_type_t probe_type = BMP_TYPE_NONE; + /* + * Segger probe PIDs are unknown, if we have a Segger probe force the type to JLink + */ + if (probe_vid == VENDOR_ID_SEGGER) { + return BMP_TYPE_JLINK; + } + for (size_t index = 0; debugger_devices[index].type != BMP_TYPE_NONE; index++) { - if (probe_vid == debugger_devices[index].vendor && probe_pid == debugger_devices[index].product) { - probe_type = debugger_devices[index].type; - break; - } + if (debugger_devices[index].vendor == probe_vid && debugger_devices[index].product == probe_pid) + return debugger_devices[index].type; } return probe_type; }