> On Oct 30, 2013, at 4:04 PM, Andreas Fritiofson 
> <[email protected]> wrote:
> 
> 
> 
> 
>> On Wed, Oct 30, 2013 at 9:26 PM, Brandon Warhurst <[email protected]> 
>> wrote:
>>  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.
>  
Just haven't tested it.  Want to do it though.

>> 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?
>  

No, it doesn't power the target.  Since I deal with many targets, it is very 
handy not to have to "detect" or "fake" target power with a bench supply or by 
finding it on the target board.  This way I can put the voltage into the setup 
script.
>>  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?
> 

It uses actually 2:  port a & c, a as an SPI interface and C as bit bang.  C 
controls the ability to use the SPI interface, and A allows me to change a 
resistor.  I use the FT4232.
>>   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.
> 

Do you have an example?

>>   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.
> 

Maybe an example here too?  I think I get the idea, but it would be nice to see 
how it would fit into the compile/link scheme so that I can intercept the init 
correctly.
> /Andreas

PS: unfortunately, the schematic isn't available.  The funny thing is that the 
Jtagulator has a similar approach, but it doesn't do actual JTAG like ours and 
we developed this about 2 years ago.

------------------------------------------------------------------------------
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