This is an automated email from Gerrit.

Leonard Crestez ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5440

-- gerrit

commit 6af7e25187d3313fba6cab6394b5dd7be352c331
Author: Leonard Crestez <[email protected]>
Date:   Thu Feb 6 16:13:25 2020 +0200

    ftdi: Report an error if no ftdi_vid_pid is specified
    
    By default the list of VID/PID is empty so if ftdi_vid_pid is not called
    then no matches are attempted. The only message is at -d3:
    
        Command 'init' failed with error code -100"
    
    Check for this condition explicitly to make life easier for people
    configuring adapters.
    
    Change-Id: If0f93370c9e9ddc9700aae7c346c1c6dd319152e
    Signed-off-by: Leonard Crestez <[email protected]>

diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
index 40d076e..ef53b68 100644
--- a/src/jtag/drivers/ftdi.c
+++ b/src/jtag/drivers/ftdi.c
@@ -648,6 +648,11 @@ static int ftdi_initialize(void)
        else
                LOG_DEBUG("ftdi interface using shortest path jtag state 
transitions");
 
+       if (!ftdi_vid[0] && !ftdi_pid[0]) {
+               LOG_ERROR("Please specify ftdi_vid_pid");
+               return ERROR_JTAG_INIT_FAILED;
+       }
+
        for (int i = 0; ftdi_vid[i] || ftdi_pid[i]; i++) {
                mpsse_ctx = mpsse_open(&ftdi_vid[i], &ftdi_pid[i], 
ftdi_device_desc,
                                ftdi_serial, jtag_usb_get_location(), 
ftdi_channel);

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to