world leader in high performance signal processing
Trace: » debug

Kernel Debugging

There are various ways to debug the kernel, which span the ranges of very powerful (but complex), to easy (but not very powerful). In order:

  • printk is a common method of debugging (print out interesting information).
  • turn on Generate Blackfin MMR tree in Kernel hacking. This provides a MMR tree in /sys/kernel/debug/blackfin. Just
     root:/> cat /sys/kernel/debug/blackfin/Port_A/PORTA_MUX
    root:/> echo 0x1 > /sys/kernel/debug/blackfin/Port_A/PORTA_MUX
  • Post Mortem Analysis is sometimes needed when the kernel is dieing without any indiciation, for a quick look at what is going on.
  • Early Printk output is useful when the kernel crashes very early on in the boot process.
  • a In Circuit Emulator (ICE) provides bare hardware debugging.
  • The kernel debugger provides most of the same facilities of an ICE, but without the extra hardware, but requires ethernet or a dedicated serial port.
  • The Embedded Linux Wiki site has a lot of common examples as well: