On 27/07/12 10:55 AM, Vinay Vijendra Kumar Lakshmi wrote:
Hi,
I am new to OpenOCD. I got a rough idea of how OpenOCD works by
downloading the latest version from the GIT repository, building
OpenOCD on a Linux machine, used a J-Link interface to debug a
Phytec-LPC3250 board.
I want to add a new adapter/interface. The JTAG debug adapter has a
LPC4320 on it and can be connected to the PC through MiniUSB.
As far as I could figure out from the directory structure of OpenOCD,
I see the files in $INSTALL_DIR/src/jtag contain the required files
for all the JTAG debug adapters that OpenOCD currectly supports.
So, to add a new adapter, should I be writing a driver(say
LPC_Link2.c) in $INSTALL_DIR/src/jtag/drivers/ and write a
configuration file(say LPC_Link2.cfg) in $INSTALL_DIR/tcl/interface ?
So my two specific questions are:
1.What are the steps to add a new JTAG adapter?
2.If I am right about the driver to be written in
$INSTALL_DIR/src/jtag/drivers/, please let me know if there is any
document which I can follow to write a new JTAG driver for the OpenOCD?
I look forward to hearing from you.
Thanks and Regards,
Vinay
So there's a new lpc-link based on LPC4320? I thought they originally
used LPC3154.
Are you comfortable with sniffing the usb to determine the protocol? If
you've got this figured out then the hardest part is done.
If you don't have a protocol worked out you may have more luck writing
your own firmware instead that emulates the protocol of an adapter
already supported. I've done a bit of work porting opendous/estick
firmware to lpc3131, by memory I got it to a working stage but it was
pretty slow, and then I abandoned it for an alternative method of
production programming altogether.
But if you go the stock firmware route, basically yes, there will be the
driver source file, and the config file for runtime.
I doubt there will be any docs to help you as such, but if you examine
the parallel port driver that's probably the simplest one, you could
replicate that and use it as your base point to write your own driver.
Later down the track once the driver's written and working I think
you'll need to look at the autoconf files and such to add configure
entries to allow your driver to be compiled as an option.
If your end goal is simply to use the lpclink in eclipse or similar, I
have seen reference to using code-red's host app from lpcxpresso to talk
to the adapter, and then connect a regular gdb to it. I don't have a
lpc-link to try this out though.
http://www.coocox.org/forum/topic.php?id=1387
Andrew
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel