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 Kernel debug by CCS for AM3874

Genius 5785 points
Other Parts Discussed in Thread: AM3874

Hello,

I'd like to debug linux kernel of AM3874 by CCS stop mode debug. I confirmed that the processing stops at __init ti8148_evm_init function in board-ti8148evm.c by Hardware breakpoint.

/ti-ezsdk_dm814x-evm_5_04_00_11/board-support/linux-2.6.37-psp04.04.00.01/arch/arm/mach-omap2/board-ti8148evm.c

But, I can't execute Step Into and Step Over using CCS operation. It seems that program counter is changing, but CCS can not trace C source code. Then if I execute resume, Kernel boots up correctly.

I've ever been successful for stop mode debug of AM335x EZSDKv6. I made uImage by following steps.

# cd /home/user/ti-ezsdk_dm814x-evm_5_04_00_11/board-support/linux-2.6.37-psp04.04.00.01
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper
# make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8148_evm_defconfig
# make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig

check: Kernel hacking -> Kernel debugging
check: Kernel hacking -> Compile the kernel with debug info
Exit -> Exit -> (Save)Yes

# make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage

Best regards

  • Hi Kazu,

    Kazu Kon said:

    /ti-ezsdk_dm814x-evm_5_04_00_11/board-support/linux-2.6.37-psp04.04.00.01/arch/arm/mach-omap2/board-ti8148evm.c

    But, I can't execute Step Into and Step Over using CCS operation. It seems that program counter is changing, but CCS can not trace C source code.

    Do you open/load the board-ti8148evm.c file into the CCS view/window? File -> Open File -> board-ti8148evm.c

    Kazu Kon said:
    # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper

    What is this step for? Can you try without it.

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_User_Guide#Linux_Kernel

    BR
    Pavel

  • Hi Pavel

    Thank you for your advice. I opened board-ti8148evm.c using Project Explorer. I stop typing command line for mrproper. But it's not working. I referred following web site incidentally.
    http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_uboot_linux_debug_with_ccsv5#Lab_Steps_6

    Is it OK if I use builder for arm-none-linux-gnueabi (NOT arm-arago-linux-gnueabi)?
    http://processors.wiki.ti.com/index.php/DM814x_AM387x_PSP_User_Guide#Linux_Kernel

    Regards,
    Kazu

  • Hi Kazu,

    Kazu Kon said:
    http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_uboot_linux_debug_with_ccsv5#Lab_Steps_6

    This is for AM335x device. For AM387x device it should be similar.

    Kazu Kon said:
    Is it OK if I use builder for arm-none-linux-gnueabi (NOT arm-arago-linux-gnueabi)?
    http://processors.wiki.ti.com/index.php/DM814x_AM387x_PSP_User_Guide#Linux_Kernel

    Yes, arm-none-linux-gnueabi is correct.

    Regards
    Pavel

  • Hi Pavel,

    Thanks, I understand. I forgot to enable "Enable Stack unwinding support" in menuconfig. Now, it's working. Thank you for reminding me this thing.

    Regards,
    Kazu