On Tue, Feb 14, 2012 at 12:39 PM, Vivien Giraud <[email protected]> wrote: > On 02/14/2012 12:14 PM, Andreas Fritiofson wrote: >>>>> >>>>> FT4232H don't work with OpenOCD you have to change some code because >>>>> FT4232 >>>>> PID is 0x6011 not 0x6010 and it's hard-coded. >>>> >>>> No, VID/PID is not hard coded in OpenOCD. They are configured from Tcl >>>> at runtime. >>> >>> For me this is hardcoded : >>> static uint16_t ft2232_vid[MAX_USB_IDS + 1] = { 0x0403, 0 }; >>> static uint16_t ft2232_pid[MAX_USB_IDS + 1] = { 0x6011, 0 }; >> >> This is just a list of accepted vid/pid pairs that is populated with >> FT2232 vid/pid from start. The list is appended with values from Tcl >> configuration at runtime. See for example >> tcl/interface/arm-usb-ocd.cfg. > > So why I need to change 0x6010 to 0x6011 to make it work :s ? > I'm really sorry for those questions, but I do'nt really understand that > part, I will deeply work on Tcl files this afternoon.
You will need to tell OpenOCD when you start it which Tcl files you want to load. See the -f switch. By default it tries to load openocd.cfg in the current directory. From that you can source the interface, board and/or target config files that are relevant for the project. I suggest you make an interface config file based on one of the others that are using FTDI, change the vid_pid, description and layout to match your device and load that file with -f (or source it from openocd.cfg). Of course if the I/O mapping (layout) of your own hardware doesn't match one of the existing layouts, you will have to add your layout in C code and specify that one from Tcl. (This is what I want to be entirely specified in Tcl so the C code doesn't have to be cluttered with layout code.) /Andreas ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
