On Fri, Nov 18, 2011 at 3:47 PM, Mathias K. <[email protected]> wrote:
> is there any plan to support new interfaces like bdm, stlink, msp430-fet or 
> lpc-link thats quite
> different or works on higher layers then the simple jtag interface?

Hello Mathias, some time ago I have proposed general restructurization
of openocd internals, it looks in brief as below:

We need to clearly divide program into modules that have clear
execution flow using clean data structures (i.e. context) instead
global variables.

Interface is the standard function set to drive the custom hardware in
a generic manner. Higher layers are supposed to be done by TRANSPORT
layer, so all drivers are the same :-) Above the transport there is a
TARGET layer. Above there is a FLASH, OS, SMP, ...

My proposition that is working with libswd is the "interface_bitbang"
and "interface_transfer" generic function set that can toggle any port
pin (even the internal logic such as RnW) and to transfer in/out
bytestream out of char array. This works well and should do the job
for all higher level transports. This is somehow contadiction to
current placement of data into program queue. This queue should be
left for internals imo. Librification of the transport and maybe other
modules will allow to rapidly functionalities to expand without impact
on other modules.

Transport can be implemented by external library (such as libswd) so
there is no need to expand internal structures and queues of the
openocd. This wat we can also implement I2C, SPI, 1Wire, and any other
protocol without impacting the rest of the program.

Data structures should be contained into one structrue ot set of
structures residing within "openocd_context" that is related with some
openocd thread. This way we can have multiple openocd threads even in
one program. Each thread can use different target or different
interace... Structures might be aligned flat, as a list, of as a tree
resembling the modules hierarchy (i.e. interface holds transport and
transport holds target, or simply context stores all of them)...

Best regards,
Tomek

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

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to