Tomek CEDRO wrote:
On Mon, Jun 20, 2011 at 9:19 PM, amotec-laurent_gauch
<[email protected]> wrote:
Your TCL bitbang will control the port of the FTDI from an higher level than
FT2232.c. OK but you TCL bitbang is specific to the layout used. How do you
accept or not the use of the TCL procedure, if you do not have the notion of
layout in this function ???

Let's assume we want to use our specific interface to quickly flash
the SPI memory because we have no time to get familiar with source
code and complex program internals...
You say yourself : a specific interface. The specific interface, for a ft2232 based dongle is in the layout.
some_very_specific_interface.cfg:
(..)
interface_signal MOSI 0x01
interface_signal MISO 0x02
interface_signal SCK   0x04
interface_signal EN     0x08
interface_signal SPI    0

TCL script then can check if signal SPI is defined (no mask value, so
no pin is driven, it is only informational), if so check if other
signals are defined and proper value, if so work the SPI operation, if
not return error because interface does not define/support necessary
signals.
If no such signals are defined by interface configuration file, there
is no option to drive those signals on that specific interface, so
there is no worry anything get broken.

Again - signals are to be defined inside interface configuration file,
so the signals are also layout specific. This is far more better
solution than hardcoding them into source code...
Better for what ? Yes, for a easy bitbanged pin access, but this will be dangerous for end-user, and you bypass the ft2232.c where the specific layout is controlled.

And, you have to check the signal interface ???

Btw. I have to add signal check interface to TCL command :-) How to
make tcl command return some value that can be used for later
calculation (i.e. "interface_signal mask" returns 0 for SPI signal, 1
for MOSI, 2 for MISO, ...) ?


Again, you have a notion of check ... that you should do hardcoded in the source code.
How does the ADC controlled from K T ?

It is connected somehow to free IO pinf on the FT2232H port.
So it is specific to a given layout ... but you do no let know which pin to the end-user ...

Best regards! :-)
Tomek

Regards,
Laurent
http://www.amontec.com

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to