geryhun wrote:BTW, openocd is a great tool for debugging, it worked with my device (MIPS 4KEc compatible CPU + EJTAG 2.6) so it's very likely you'll be able to use it with yours, too. I don't find the configuration I used, though... 
I could use the built-in configuration for MIPS32 processors, I just had to slightly modify it to make it work with my device, not sure what and how exactly, though.
Here is a terse reading about my experience if you are interested (translated by Google):
https://translate.google.com/translate? … edit-text=
cool! Thanks for sharing your experience. I read the general jtag guidelines from openwrt wiki and from several articles I found online through google. It seems that the relatively well documented jtag device used for openwrt uses parallel port for connection. But I have only Segger J-link and FT2332 based Olimex arm-usb-ocd in my hand. So, it will be convenient to use openocd instead. FYI, my router has MIPS 24Kc based MT7620A SoC.
I connected the olimex jtag to the router and used all the pins. I connected Vcc from the board to the Vcc(ref) pin of jtag, pin 1. Without any configuration, when I connected it to the computer, the router reset and remain halt (or infinite reset loop, not sure), and disconnecting the jtag device made the router start again. On the other hand connecting the j-link to the router showed erratic behavior on the router side (pics @ http://imgur.com/a/oaz7E), nor did jlink software recognize the CPU. So, I am going to stick to olimex jtag as long as I can't figure out the issue with jlink.
I should confess that my hardware debugging experience is limited within ARM series only, and I have little knowledge on MIPS. About openocd - I found MIPS32 files and sample of MIPS 4k debug cfg files. However, I am confused if the default MIPS32 files are going to support MIPS 24Kc. I'm trying to figure that out. A quick search through programming guide for MT7620A and the data sheet didn't help much either. The open resource on EJTAG is so little that it seems, unlike ARM, hardware debugging is optional for MIPS.
I will be glad to share my whole experience in debugging this router once I succeed. But it seems a long journey (or no journey) for me. Any suggestion and help is appreciated. 