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.

PROCESSOR-SDK-AM335X: Enable the GDB to debug an application

Part Number: PROCESSOR-SDK-AM335X

Tool/software:

we have created our custom application after building TISDK(9.1.0.1 i need to debug via. gdb 

i am not able to see gdb utility after cross compilation of application.

please let me know is there any other way to debug applications

  • Hi Manu.

    we have created our custom application after building TISDK(9.1.0.1 i need to debug via. gdb 

    i am not able to see gdb utility after cross compilation of application.

    How are you trying to build GBD? Using Yocto?

    It should already be part of the TI Yocto 'tisdk-default-image' type images, like this one...

    root@am62pxx-evm:~# gdb
    GNU gdb (GDB) 11.2
    Copyright (C) 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "aarch64-oe-linux".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <https://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word".
    (gdb)

    Regards, Andreas

  • , okay

    Yes, its in yocto enviornment.. i have been checking in 8.2.0 (olde version).. i am not able to see.. 

    can you please provide reference or information on how to add in yocto enviornment in 8.2.0..

    its help us

  • Hi Manu,

    I got a chance to double-check the WIC image for AM335x from SDK v9.1, and indeed GDB is there.

    a0797059@dasso:~/tisdk/am335x-evm/build (dev)
    $ source conf/setenv
    
    a0797059@dasso:~/tisdk/am335x-evm/build (dev)
    $ unxz -k deploy-ti/images/am335x-evm/tisdk-default-image-am335x-evm.wic.xz
    
    a0797059@dasso:~/tisdk/am335x-evm/build (dev)
    $ wic ls deploy-ti/images/am335x-evm/tisdk-default-image-am335x-evm.wic
    Num     Start        End          Size      Fstype
     1       1048576    135266303    134217728  fat16
     2     135266304   7696525311   7561259008  ext4
    
    0797059@dasso:~/tisdk/am335x-evm/build (dev)
    $ wic ls deploy-ti/images/am335x-evm/tisdk-default-image-am335x-evm.wic:2/usr/bin | grep gdb
       9897  100755 (1)      0      0   46768  9-Mar-2018 06:34 vgdb
       9070  100755 (1)      0      0   30608  9-Mar-2018 06:34 gdbus
       9068  100755 (1)      0      0    4587  9-Mar-2018 06:34 gdb-add-index
       9067  100755 (1)      0      0   5456152  9-Mar-2018 06:34 gdb
       9069  100755 (1)      0      0   314868  9-Mar-2018 06:34 gdbserver

    So I would highly suggest you move to v9.1., not just to get gdb but because this version is much newer/improved all around.

    If you must have gdb with SDK v8.2, I don't have this setup here, but having a quick look at the Yocto sources it looks like gdb is added by way of the tools-debug image feature (or the packagegroup-core-tools-debug package group). Try adding those to your image, like this:

    # Add to conf/local.conf (or extend, if it already exists)
    EXTRA_IMAGE_FEATURES = "tools-debug"

    Regards, Andreas