Hi Tomek,

I think the solution with high-level interfaces is to allow them to do their
bitstream magic directly if they have that capability and for low-level
interfaces turn to libswd or other future libraries for other transports.  I
have doubts about the feasibility of trying to make most high-level
interfaces behave like low-level devices.  This would most certainly be a
problem for jlink and I suspect for others as well.  Personally I think that
path is a non-starter.

Ideally from my perspective the best solution would be to have each dongle
-- regardless of the manufacturer -- behave like a high-level device at the
OpenOCD driver level using a common unified API that enumerates what
capabilities it supports but leaving each driver to decide how to handle
"bit-blasting" activities under the hood.  In the case of a high-level
device like jlink, most of the driver code would provide pass-thru +
necessary glue logic (pretty much what it does now).  For low-level devices,
this could call on existing libraries like libswd or even new ones for
future transports.

The question is how to do this without making a mess in existing code
currently heavily-invested in jtag.  I think whatever the API looks like
needs to maintain backward compatibility with the existing approach by
either providing a superset-based API or alternatively support both a legacy
and advanced API.

Since you have spent a lot more time thinking about this then I have, what
is your ideal API scheme in light of the various realities mentioned above?
I haven't fiddled in the bowels of OpenOCD much outside the driver level so
my ideas may have other problems when tested against reality.

Gary
 


On 8/22/11 11:51 PM, "Tomek CEDRO" <tomek.ce...@gmail.com> wrote:

> 
> Maybe it is not necessary to use libswd at all with interfaces that
> can construct transport packets on their own so high-level-interface
> would rather need to use "target" structure directly if it can. We
> need to sort it out to create common API that would suit most
> high-level-interfaces, or simply force them to pass our bitstream
> generated with some external library (such as libswd) which seems more
> versatile but can have some impact on speed..?
> 


_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to