This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5726: Debugging Linux Kernel

Part Number: AM5726

Tool/software: Linux

Hi,

I've been pretty active on forums with trouble getting Linux to boot our custom board using am AM5726.

I am debugging the kernel by building in printfs which is pretty tedious and slow.

I'm mostly using the dev_err() call. Is is appropriate to use this call?

It would be great to debug the kernel live.

We found this guide which is for the AM335x EVM-SK and Code Composer version 5 and some of the kernel menu options look different from our menu options.

Can you provide any guidance or tips for how to do this for the AM5726 custom board, based on the IDK board.

Thanks,

Christine

  • Christine,

    Kernel debugging is a very important but broad topic. But there is no one-fit-for-all debug technique to cover all scenarios in kernel bugging. Depending on what exact the issue to tackle, there is always one way which does better job than others.

    I do kernel debugging in daily basis, but only used CCS live debugging once a long time ago, mainly to understand the setup. Again, depending on the issue to be debugged, Jtag connection is better than kgdb sometimes. And CCS is not a good choice for hardware peripheral related debugging, because most of those cases don't allow halting the system.

    Other than printfs, kernel already provides many debug infrastructure, which could be helpful in many cases. The training series in the link below introduces some of them, but I guess you know most of them.

    training.ti.com/debugging-embedded-linux-systems-training-series

    But its module 1.5 talks about kernel dynamic debug, which could be useful to dynamically enabling/disabling debug logs. Kernel doc has details:
    <kernel source code>/Documentation/admin-guide/dynamic-debug-howto.rst

    Ftrace is another very helpful tool provided in kernel, I mainly use ftrace + printks in my daily kernel debugging. Kernel doc has details about ftrace:

    <kernel source code>/Documentation/trace/

    Hope this information is helpful.