On Fri, Jan 20, 2012 at 7:38 PM, CeDeROM <[email protected]> wrote:
> On Thu, Jan 19, 2012 at 11:23 PM, Mathias K. <[email protected]> wrote:
>> You are right, but the jtag and swd are registering itself to the transport 
>> class without any
>> interface. How to address it in the configuration?

To be more specific on your question - interface can have generic
"bitbang" and "transfer" that is enough to implement most operations
for any kind of transport/bus. Those functions can be used by upper
layer named "transport" and transport can be used by "target" which
simply read/write target registers and transport converts it into a
bus/bitstream operations.

Transport can have its own queue for operations and it should not
interfere with openocd command queue so the code is modular and each
modules does not interfere with each other and with the openocd
itself. Interface functions for generic bitbang/transfer also have
generic null pointer included as parameter that can be used to
implement any kind of driver, i.e. not only bitstream interface that
simply writes/reads the bits, but also more advanced command driven
interfaces that would only need access to the payload only and
generate control sequences themselves.

It is important to create one context for openocd and keep everything
inside that context - interface, transport, target, bus, memory, etc,
so they can be used easily and well organized fashion. Maybe a pointer
to each of them would be enough, this is important to choose good
design here.

We will see what can be used of that design on libswd implementation.
As for now it also turns out that transport needs to handle errors
itself as openocd high level functions does not provide retry
mechanisms, those mechanisms are transport dependent and they are a
bit tricky to implement when many enqueued elements are flushed at
once...

Best regards,
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

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

Reply via email to