Thanks everyone,

Here's an updated patch, also pasted here in case of spacing issues:
http://pastie.org/1459568

One of the contributors to the project wanted me to add this node about the compile: its not picking up the libs, and we have to manually add them to the jtag makefile and also the bsdl2jtag makefile

Regards,

Ian

diff -crB urjtag/urjtag/include/urjtag/cable.h urjtag-current/urjtag/include/urjtag/cable.h *** urjtag/urjtag/include/urjtag/cable.h 2011-01-14 12:35:38.631164004 +0200 --- urjtag-current/urjtag/include/urjtag/cable.h 2011-01-14 12:42:10.879164002 +0200
***************
*** 63,68 ****
--- 63,69 ----
URJ_CABLE_PARAM_KEY_TDO, /* lu gpio used as TDO */ URJ_CABLE_PARAM_KEY_TMS, /* lu gpio used as TMS */ URJ_CABLE_PARAM_KEY_TCK, /* lu gpio used as TCK */
+     URJ_CABLE_PARAM_KEY_INTERFACE,      /* lu           ftdi */
  }
  urj_cable_param_key_t;

diff -crB urjtag/urjtag/include/urjtag/usbconn.h urjtag-current/urjtag/include/urjtag/usbconn.h *** urjtag/urjtag/include/urjtag/usbconn.h 2011-01-14 12:35:38.628164001 +0200 --- urjtag-current/urjtag/include/urjtag/usbconn.h 2011-01-14 12:43:01.296164002 +0200
***************
*** 38,43 ****
--- 38,44 ----
      const char *driver;
      int32_t vid;
      int32_t pid;
+     int32_t interface;
  }
  urj_usbconn_cable_t;

diff -crB urjtag/urjtag/src/tap/cable/generic_usbconn.c urjtag-current/urjtag/src/tap/cable/generic_usbconn.c *** urjtag/urjtag/src/tap/cable/generic_usbconn.c 2011-01-14 12:35:42.222164000 +0200 --- urjtag-current/urjtag/src/tap/cable/generic_usbconn.c 2011-01-14 12:57:07.785164001 +0200
***************
*** 51,56 ****
--- 51,57 ----
          NULL,                   /* no specific driver */
          -1,                     /* no VID */
          -1,                     /* no PID */
+      0,            /* default interface */
      };

      urj_tap_cable_generic_params_t *cable_params;
***************
*** 80,85 ****
--- 81,89 ----
              case URJ_CABLE_PARAM_KEY_DRIVER:
                  user_specified.driver = params[i]->value.string;
                  break;
+          case URJ_CABLE_PARAM_KEY_INTERFACE:
+          user_specified.interface = params[i]->value.lu;
+         break;
              default:
                  // hand these to the driver connect()
                  break;
***************
*** 114,119 ****
--- 118,125 ----
                              cable_try.pid = user_specified.pid;
                          if (user_specified.desc != 0)
                              cable_try.desc = user_specified.desc;
+                         if (user_specified.interface != 0)
+ cable_try.interface = user_specified.interface;

conn = urj_tap_usbconn_drivers[i]->connect (&cable_try, params); diff -crB urjtag/urjtag/src/tap/cable.c urjtag-current/urjtag/src/tap/cable.c
*** urjtag/urjtag/src/tap/cable.c    2011-01-14 12:35:42.416164002 +0200
--- urjtag-current/urjtag/src/tap/cable.c 2011-01-14 12:48:01.706164001 +0200
***************
*** 672,677 ****
--- 672,678 ----
      { URJ_CABLE_PARAM_KEY_TDO,          URJ_PARAM_TYPE_LU,      "tdo", },
      { URJ_CABLE_PARAM_KEY_TMS,          URJ_PARAM_TYPE_LU,      "tms", },
      { URJ_CABLE_PARAM_KEY_TCK,          URJ_PARAM_TYPE_LU,      "tck", },
+ { URJ_CABLE_PARAM_KEY_INTERFACE, URJ_PARAM_TYPE_LU, "interface", },
  };

  const urj_param_list_t urj_cable_param_list =
diff -crB urjtag/urjtag/src/tap/usbconn/libftd2xx.c urjtag-current/urjtag/src/tap/usbconn/libftd2xx.c *** urjtag/urjtag/src/tap/usbconn/libftd2xx.c 2011-01-14 12:35:42.406164008 +0200 --- urjtag-current/urjtag/src/tap/usbconn/libftd2xx.c 2011-01-14 12:51:01.884164000 +0200
***************
*** 36,41 ****
--- 36,42 ----
  #include <urjtag/error.h>
  #include <urjtag/log.h>
  #include <urjtag/usbconn.h>
+ #include <urjtag/cable.h>
  #include "libftdx.h"
  #include "../usbconn.h"

***************
*** 50,55 ****
--- 51,57 ----
      unsigned int pid;
      FT_HANDLE fc;
      char *serial;
+     unsigned int interface;
      /* send and receive buffer handling */
      uint32_t send_buf_len;
      uint32_t send_buffered;
***************
*** 331,336 ****
--- 333,339 ----
      p->fc = NULL;
      p->pid = template->pid;
      p->vid = template->vid;
+     p->interface = template->interface;
      /* @@@@ RFHH check strdup result */
      p->serial = template->desc ? strdup (template->desc) : NULL;

***************
*** 395,401 ****
      }
      else
          /* give it a plain try */
!         status = FT_Open (0, &p->fc);

      if (status != FT_OK)
      {
--- 398,404 ----
      }
      else
          /* give it a plain try */
!         status = FT_Open (p->interface, &p->fc);

      if (status != FT_OK)
      {
diff -crB urjtag/urjtag/src/tap/usbconn/libftdi.c urjtag-current/urjtag/src/tap/usbconn/libftdi.c *** urjtag/urjtag/src/tap/usbconn/libftdi.c 2011-01-14 12:35:42.406164008 +0200 --- urjtag-current/urjtag/src/tap/usbconn/libftdi.c 2011-01-14 12:52:55.586164002 +0200
***************
*** 36,41 ****
--- 36,42 ----
  #include <urjtag/error.h>
  #include <urjtag/log.h>
  #include <urjtag/usbconn.h>
+ #include <urjtag/cable.h>
  #include "libftdx.h"
  #include "../usbconn.h"

***************
*** 46,51 ****
--- 47,54 ----
      unsigned int pid;
      struct ftdi_context *fc;
      char *serial;
+     /* ftdi interface selection */
+     unsigned int interface;
      /* send and receive buffer handling */
      uint32_t send_buf_len;
      uint32_t send_buffered;
***************
*** 310,315 ****
--- 313,319 ----
      p->fc = fc;
      p->pid = template->pid;
      p->vid = template->vid;
+     p->interface = template->interface;
      /* @@@@ RFHH check strdup result */
      p->serial = template->desc ? strdup (template->desc) : NULL;

diff -crB urjtag/urjtag/sysdep.h urjtag-current/urjtag/sysdep.h
*** urjtag/urjtag/sysdep.h    2011-01-14 12:36:13.477164002 +0200
--- urjtag-current/urjtag/sysdep.h    2011-01-14 12:41:07.378164002 +0200
***************
*** 56,61 ****
--- 56,65 ----
  #define mkdir(path, mode) mkdir(path)
  #endif

+ #ifdef interface
+ #undef interface
+ #endif
+
  #ifndef HAVE_GETEUID
  #define geteuid() 0
  #endif

On 1/14/2011 5:50 AM, Mike Frysinger wrote:
On Thursday, January 13, 2011 20:21:26 Xiaofan Chen wrote:
/*
  * 'interface' is defined somewhere in the Windows header files. This macro
  * is deleted here to avoid conflicts and compile errors.
  */
#ifdef interface
#undef interface
#endif
let's add this to the top level sysdep.h in urjtag then
-mike


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl


_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to