Debugging with beaglebone black

I have a question about the beaglebone black. How am suppose to debug with it? I really would prefer not to have to solder a JTAG header. Also the JTAG header would be under the board which is really inconvenient. The case that came with my board also has no room for the JTAG header so it would basically render the case useless. I know it has a serial debug header but how could I debug with it? I want to debug kernel modules.

To debug kernel modules with JTAG, you have to have a debugger which is kernel aware like Lauterbach. If you don’t want to use JTAG, then use printk or dev-dbg, dev-err, etc. You can also use ftrace, which requires you to build your own kernel and add support for the various ftrace features. Read kernel docs under documentation/trace/ftrace.txt to learn more.

Regards,
John

https://www.google.com/search?q=how+to+debug+linux+kernel+modules

Just like you would on any platform.

That is, kgdb . . .

Problem with GDB, is you cannot start the debugger until after the kernel module is loaded, which means no debugging of init or probe sections. The reason is GDB doesn’t know where in memory the kernel module is loaded until after it is loaded. This is why you need a kernel aware debugger like Lauterbach which loads the kernel module code, loads the debug symbols and breaks at the start of init.

Regards,
John

John I remember using Lauterbach to do this isn’t CCS kernel aware?

CCSV4 was partially aware, but CCSV5 and CCSV6 are not.

http://processors.wiki.ti.com/index.php/Linux_Aware_Debug_(CCSv4.x)

Regards,
John

Oh, and one more thing, CCSV4 won’t work with the V4 kernels because of data structure changes in the kernel.

Regards,
John