On Wed, Oct 30, 2013 at 9:26 PM, Brandon Warhurst <[email protected]>wrote:

> I've been following some of this list for a while now, particularly
> regarding FTDI based JTAG tool development.  I only recently noticed that I
> no longer needed to patch into ft2232.c, but instead could simply write a
> configuration file for my FT4232H based dongle.  Since I don't use the
> provided d2xx driver, I don't have too many speed issues.


The ftdi driver should be much faster than the old ft2232 driver, even when
the latter uses d2xx.


> So I'm excited the code is getting cleaned up.  However, I've got a bit of
> a problem.  I have a unique JTAG dongle that allows me to select the target
> voltage.


As in powering the target from the adapter? Is this a custom adapter or one
that is generally available for purchase?


>  I typically use a python script for this (there was a libmpsse project
> somewhere, and I added a little additional SPI support and it has python
> bindings).  However, it would be extraordinarily nice to be able to do this
> directly through OpenOCD.  I noticed that there are several commands for
> adapters in general that get added during OpenOCD initialization, however,
> since this feature isn't present in EVERY FTDI JTAG adapter, I wanted to be
> able to add scriptable commands either through the interface script, or on
> top of the FTDI code, but without polluting the FTDI code.  This is where
> the problem comes in:
>   Basically I have to open one port as an SPI interface temporarily, send
> some commands then I'm set and can act like a simple FTDI JTAG.
>

Is it the same interface (FTDI channel) that is used for JTAG after setup,
or is it one of the other three channels? Are there schematics available?

  1) I don't see any way to really do what I need through the scripting
> interface
>

That kind of low level access (MPSSE commands) is not exposed to the
scripting interface. But you DO have full control over the FTDI GPIO pins,
so if you're not going to transfer huge amount of data, you might be able
to (slowly) bitbang the SPI commands using a series of ftdi_set_signal
commands. You'd have to define all the required signals in the
configuration file beforehand.

  2) I didn't want to add a MOSTLY IDENTICAL JTAG driver into the mix.
>

No that would be nasty and we probably wouldn't accept it into mainline if
you wanted to.


> Is there any way to do this WITHOUT having to add another "mostly
> identical" JTAG driver?  It is unbelievably convenient to just write a
> script and have support for my adapter.
>

If the SPI traffic uses another interface, you might be able to create a
kind of "proxy" driver that just intercepts the init, opens the SPI
interface, does it's stuff using the mpsse layer, closes the interface and
calls into the regular ftdi driver init. The rest of the adapter API would
just forward to the ftdi driver. Actually, this could be doable even if the
SPI and the JTAG interface are the same, although the bitbang solution
would probably be nicer in that case.

/Andreas
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to