We can use bfin gdbproxy to debug the kernel, as described in:
A more hands on step by step operation sequence looks like following:
1)On host PC, run “bfin-gdbproxy bfin”, you will see information like “waiting on TCP port 2000”. Then leave this terminal alone.
2)Reset the target board, it should run into Linux console, generally we would use the tftp load uImage way to do this during the development, step is identical to running a default uImage.
3)On host PC, open a new terminal, and run "bfin-uclinux-gdb vmlinux", note you must have the generated vmlinux in current path you run this command, and the vmlinux file should be the one generated together with your uImage you booted in step 2.
4)Then you should see a typical gdb command line interface is up, there you can do lots of things following the general gdb rule, it's often something like:
a) target remote:2000 (from here the board should be frozen)
b) b start_kernel (set a breakpoint in kernel function start_kernel, or any other function, lines you want to break )
c) c (target continue to run, and stop at the breakpoint specified in step b)
you can also use more gdb facilities, for example use watch to watch a specific variable, google "gdb usage" for more gdb related facilities and usage.