From: Andrey G. <and...@e-...> - 2015-04-16 18:42:30
|
Paul, 2015-04-11 20:55 GMT+02:00, Paul Fertser <fer...@gm...>: > Hey Andrey, > > On Sat, Apr 11, 2015 at 07:08:36PM +0200, Andrey Gursky wrote: >> 2015-04-06 19:18 GMT+02:00, Paul Fertser <fer...@gm...>: >> > On Mon, Apr 06, 2015 at 06:04:46PM +0200, Andrey Gursky wrote: >> >> I'd like to know details about how to add a new target for openocd. >> >> How difficult is to add some very basic support like run/halt target, >> >> then read/write embedded RAM memory? Are these jtag commands common or >> >> proprietary? >> > >> > When JTAG is used for debugging, it's just a transport for a bunch of >> > vendor-specific commands. Some vendors document those, some do not. >> >> Do you have some references, how typical commands look like? And why >> irlen can be in such big range from 6 to 38? > > I suggest you search for file named > IHI0031A_ARM_debug_interface_v5.pdf , it's the official ARM reference > for their debug interface. Another option is to look for some EJTAG > (MIPS) documents. > >> Thanks. But it sounds like no jtag tools are here? OpenOCD could be >> programmed without these at all because all has been done only >> according to available documentation? Maybe you could advice me a >> better place to ask about jtag related open-source development, if >> OpenOCD-list is not a such place? > > AFAICT, yes, most of the target support in OpenOCD is done by > following reference documents and not reversing. I'm unaware of any > other place, unfortunately, probably UrJTAG ML might help. Another > possible opportunity to investigating the original code is to try to > find irscan and drscan functions in the vendor binaries (it's somewhat > likely that they have functions like that), place breakpoints there > and log all the invocations. Thanks for references. I looked for *scan and found: ... --> PTI_IceScanIr() --> ... --> jsc_ScanBoth16() --> FtdiReadBuffer() / FtdiWriteBuffer() --> ... --> libftdi --> libusb. I can't see DR-related things. According to [1], obtaining a TAPID is straightforward thing and IDCODE instruction can be scaned out either. But why doesn't it work in my case (see former mail to Andreas)? [1] http://events.ccc.de/congress/2009/Fahrplan/attachments/1435_JTAG.pdf Regards, Andrey |