using kgdb or jlink jtag to debug kernel

Hi all,

In the past few days, i tried using jlink jtag to debug the kernel and it did not work well. Jlink, somehow, always reset the bb-xm upon a gdb session startup, and hence putting the program counter to 0x00. At this point, even if I continue kernel execution, uboot or kernel would not load. This reset problem is a known problem for anyone using Segger Jlink to jtag a running kernel.

I also tried using kgdb over serial. Everything worked fine with this method, except that I could not step into kernel execution using, si or n gdb commands. The error I was getting from gdb was: “Invalid remote reply.”

Please share if you know how to setup a kernel debug environment with the BB-XM using kgdb, jlink, or openocd debug interface.