This is an automated email from Gerrit. Jörg Wunsch ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/2048
-- gerrit commit fb65b7ff8af456fc11b517909d15c83a328dc45f Author: Jörg Wunsch <[email protected]> Date: Fri Mar 14 14:41:51 2014 +0100 CMSIS-DAP: print a debug message when the USB product string cannot be read As suggested by Stian Skjelstad in a comment in: http://openocd.zylin.com/#/c/2044/ if the USB product string cannot be read, provide a debug message so users might get aware of a potential permission problem when looking at the debug output. Change-Id: I6acb1c6261fec6f2bee80e4be513a5c5e29eff79 Signed-off-by: Jörg Wunsch <[email protected]> diff --git a/src/jtag/drivers/cmsis_dap_usb.c b/src/jtag/drivers/cmsis_dap_usb.c index 34f8f25..ba9da91 100644 --- a/src/jtag/drivers/cmsis_dap_usb.c +++ b/src/jtag/drivers/cmsis_dap_usb.c @@ -173,13 +173,18 @@ static int cmsis_dap_usb_open(void) devs = hid_enumerate(0x0, 0x0); cur_dev = devs; while (NULL != cur_dev) { - if ((0 == cmsis_dap_vid[0]) && (NULL != cur_dev->product_string) - && wcsstr(cur_dev->product_string, L"CMSIS-DAP")) { - /* - if the user hasn't specified VID:PID *and* - product string contains "CMSIS-DAP", pick it - */ - break; + if (0 == cmsis_dap_vid[0]) { + if (NULL == cur_dev->product_string) { + LOG_DEBUG("Cannot read product string of device 0x%x:0x%x", + cur_dev->vendor_id, cur_dev->product_id); + } else { + if ( wcsstr(cur_dev->product_string, L"CMSIS-DAP")) + /* + if the user hasn't specified VID:PID *and* + product string contains "CMSIS-DAP", pick it + */ + break; + } } else { /* otherwise, exhaustively compare against all VID:PID in list -- ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
