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.

!!! Urgent - Gdb debugger doesn't work (Code Composer 5.1.1. + SDK AM335xsdk 05_06_00_00, AM335x Starter kit)?

Urgent!

Please, can somebody confirm if gdb debugger works correctly in Code Composer 5.1.1. with the latest SDK for AM335x Starter kit (AM335xsdk 05_06_00_00).

I am working on development system for AM335x Starter kit for more than 14 days but I am still not able to debug simple helloworld application!!!

If gdb debugger works, please, give me information - how to debug helloworld application. I strictly followed documentation http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Hands_on_with_the_SDK -> Debugging with CCS and GDB but after step 8 (click Debug to compile the project and start the debug. You system should be halted at the first line of the mainfunction) the system is not haltet at the first line of the main function - debugger reports <terminated, exit value: 127>gdb <terminated> helloworld Debug [C/C++ Remote Application] gdb.

Copying of the file helloworld to the destination file system works - the problem is debugger.

I also have one question related to GDB configuration file ( .gdbinit). What is a valid content of this file (case1: destination file system is located on SD flash card, case2: destination file system is located on my computer).

Please, help me - I need good support - my project is stalled and is in great danger to be canceled (my boss has an idea to leave Texas Instruments and go to Atmel).

Where can I get previous version of SDK (AM335xsdk 05_05_00_00) - I would like to try it?

!!! Guys from TI - please, check the latest two comments from the following llink:

http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Hands_on_with_the_SDK

DjordjeZ said ...

Debugging with gdb server is not working for newest version of ti-sdk-05.06.00.00. Problem is with shared libraries of this sdk version (probably with arago toolchain libraries).

--DjordjeZ 06:38, 24 January 2013 (CST)

Jeffberryhill said ...

Has anyone gotten the gdb server working with 05.06.00.00 ?

Thanks in advance-

--Jeffberryhill 17:17, 15 February 2013 (CST)

Thanks, Edo

  • Hi Edo,

    Edvard Bregar said:
    Where can I get previous version of SDK (AM335xsdk 05_05_00_00) - I would like to try it?

    I can't comment on the issues with AM335x SDK version 5.06 and GDB debugging but I can give you a download link to 5.05:

    http://downloads.ti.com/dsps/dsps_public_sw/am_bu/sdk/AM335xSDK/05_05_01_00/exports/ti-sdk-am335x-evm-05.05.01.00-Linux-x86-Install

    Thanks

    ki

  • Thank you for help, I will try that version.

    Is anybody from TI working on issue with AM335x SDK version 5.06 and GDB debugging?

    Is AM335x SDK version 5.05 compatible with Ubuntu 12.04LTS (I don't like old Ubuntu 10.04LTS)?

    Thanks,

    Edvard

  • Have you also tried posting in the AM335x forums? You may get more responses there.

    ki

  • I will post it also in the AM335x forum - thank you for idea.

    Edo

  • I tried the AMSDK 05.06 on Ubuntu 12.04 LTS and reproduced the problem.

    Remote application terminates immediately, i.e. application cannot be launched.

    If C/C++ Application debug configuration (instead of C/C++ Remote  Application) is used more info can be obtained.

    New AMSDK 05.06 has a new file at ~/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-gdb.real that did not exist before.

    Problem has been identified to be host-side with gdb and not with gdbserver.

    Get "launching <debug configuration name> has encountered a problem.  Error message shows that it is

    trying to access a path that does not exist: /bin/arm-arago-linux-gnueabi-gdb.real.

    Cannot open shared object file.  Need to research the gdb open-source project to understand

    what needs to be changed here.  Perhaps a path needs to be added to the .gdbinit file.

    MichaelT

  • Here is some traffic from the #gdb chat room.   Looks like the rootcause is a missing file called libreadline.so.5.

    ============================================================================================

    (5:46:34 PM) The topic for #gdb is: http://sourceware.org/gdb/wiki/FAQ || 7.5 released! || Ask your question with gdb version/platform and then hang around for a while (i.e., more than 1 hour at least).
    (5:46:37 PM) xdje: s/call/function/
    (5:48:22 PM) drmeister [~drmeister@pool-108-52-166-246.phlapa.fios.verizon.net] entered the room.
    (5:51:07 PM) andersonc0d3 left the room (quit: Ping timeout: 246 seconds).
    (5:54:43 PM) eijk_ left the room (quit: Ping timeout: 245 seconds).
    (6:04:00 PM) andersonc0d3 [~andersonc@unaffiliated/andersonc0d3] entered the room.
    (6:06:32 PM) qeed [~qeed@adsl-98-85-36-29.mco.bellsouth.net] entered the room.
    (6:11:26 PM) mtadyshak: How do I know the GDB version?
    (6:11:41 PM) xdje: bash$ gdb --version
    (6:11:44 PM) xdje: (gdb) show version
    (6:11:46 PM) SamB: doesn't it tell you that when you start it?
    (6:13:01 PM) mtadyshak: See this post about GDB problems: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/247783/873031.aspx#873031
    (6:13:41 PM) mtadyshak: TI Code Composer v5.1.1 (Eclipse) cannot launch a GDB session.
    (6:14:05 PM) mtadyshak: Happens with out AMSDK v05.06 (Dec 21, 2012)
    (6:14:42 PM) mtadyshak: arm-arago-linux-gnueabi-gdb.real is a new file in this version.
    (6:14:48 PM) mtadyshak: it does not work right.
    (6:15:29 PM) mtadyshak: it hard codes a /bin/arm-arago-linux-gnueabi- path that does not exist.
    (6:15:48 PM) mtadyshak: according to failed to launch error message
    (6:15:56 PM) xdje: This path is hardcoded in the application that starts gdb?
    (6:16:08 PM) mtadyshak: i guess.
    (6:16:22 PM) xdje: That suggests the bug is outside of gdb.
    (6:16:41 PM) mtadyshak: Eclipse tries to launch GDB but fails to do so
    (6:16:50 PM) mtadyshak: what is the gdb.real file for?
    (6:16:58 PM) xdje: IIUC, ... because Eclipse is using the wrong path.
    (6:17:19 PM) xdje: Have to talk to whomever is responsible for this Eclipse.
    (6:17:58 PM) mtadyshak: But gbb.real is part of gdb isn't it?
    (6:18:13 PM) xdje: The .real suffix isn't something that is part of the gdb project, no.
    (6:18:33 PM) mtadyshak: No idea where it came from, but it is there now.
    (6:18:41 PM) xdje: Maybe the builders of this collection of software wanted to use a different name for gdb, and renamed it to gdb.real.
    (6:18:57 PM) mtadyshak: both gdb and gdb.real are there
    (6:19:16 PM) xdje: Maybe gdb is a wrapper added by them to do something and then invoke the real gdb.
    (6:19:55 PM) xdje: It's still a case of custom modifications made by them. [I'm happy to help, but at this point I'm not sure what I can say.'
    (6:20:15 PM) mtadyshak: so i should ask the eclipse project forum?
    (6:20:47 PM) xdje: I'm not familiar with Eclipse needing a gdb + gdb.real. You *may* get a similar response.
    (6:20:58 PM) mtadyshak: ok
    (6:21:13 PM) xdje: IOW, is this a custom modification made by the TI Code Composer people?
    (6:21:51 PM) xdje: You might try looking for an Eclipse option that lets you specify the path to gdb.
    (6:21:54 PM) mtadyshak: we are just building gdb from sources. I need to find out the version.
    (6:22:13 PM) mtadyshak: the gdb stuff is standard Eclipse. Not modified by TI.
    (6:22:23 PM) xdje: In the gdb source tree, the version is in $src/gdb/version.in.
    (6:22:37 PM) mtadyshak: ok
    (6:23:24 PM) xdje: I've used Eclipse only a bit, but I don't recall it ever using something like gdb.real. Then again, maybe this is a new change to Eclipse.
    (6:24:00 PM) xdje: If the problem is not finding a particular binary, researching gdb versions isn't going to help though.
    (6:25:16 PM) teawater [~teawater@114.243.12.15] entered the room.
    (6:25:24 PM) xdje: Plus, if it's just a case of a missing binary, why not do an experiment and copy gdb (or gdb.real) to the place where it's expected to be?
    (6:26:29 PM) mtadyshak: i could...
    (6:26:44 PM) xdje: The error message on that web page mentions a shared object file. That changes things.
    (6:27:04 PM) mtadyshak: Yeah?
    (6:27:21 PM) xdje: IIUC Eclipse is looking for a shared object (dynamic library) named gdb.real.
    (6:29:01 PM) xdje: You might try asking on Eclipse though. They'll presumably understand the "launching <debug configuration-name> has encountered a problem" much better than I.
    (6:29:36 PM) mtadyshak: i will post the error msg from eclipse in a moment
    (6:34:18 PM) cptG [~sabayonus@g231047226.adsl.alicedsl.de] entered the room.
    (6:34:45 PM) mtadyshak: can't seem to post a .png file on paste bin
    (6:35:56 PM) xdje: Just in case, I meant asking for help on some Eclipse channel - I'm not sure how many Eclipse users there are here.
    (6:36:31 PM) mtadyshak: Error creating session
    (6:36:31 PM) mtadyshak: /bin/arm-arago-linux-gnueabi-gdb.real: error while loading shared libraries: /bin/arm-arago-linux-gnueabi-gdb.real: cannot open shared object file: No such file or directory
    (6:36:31 PM) mtadyshak: /bin/arm-arago-linux-gnueabi-gdb.real: error while loading shared libraries: /bin/arm-arago-linux-gnueabi-gdb.real: cannot open shared object file: No such file or directory
    (6:36:31 PM) mtadyshak: /bin/arm-arago-linux-gnueabi-gdb.real: error while loading shared libraries: /bin/arm-arago-linux-gnueabi-gdb.real: cannot open shared object file: No such file or directory
    (6:36:59 PM) mtadyshak: The /bin/arm... path is non-sensical...
    (6:40:44 PM) mtadyshak: So i copied the gdb.real file to /bin/
    (6:40:50 PM) mtadyshak: now i get this error msg:
    (6:40:52 PM) mtadyshak: Error creating session
    (6:40:52 PM) mtadyshak: /bin/arm-arago-linux-gnueabi-gdb.real: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
    (6:41:41 PM) xdje: "ldd /bin/...-gdb.real" will list the dynamic libraries that gdb needs.
    (6:42:02 PM) xdje: Normally they're installed with gdb.
    (6:43:06 PM) xdje: You may need to set LD_LIBRARY_PATH for ld.so to find them (if they're in some unusual location).
    (6:43:54 PM) mtadyshak: michael@michael-usb:~/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin$ ldd /bin/arm-arago-linux-gnueabi-gdb.real
    (6:43:54 PM) mtadyshak: linux-gate.so.1 => (0xb7703000)
    (6:43:54 PM) mtadyshak: libreadline.so.5 => not found
    (6:43:54 PM) mtadyshak: libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb76e6000)
    (6:43:54 PM) mtadyshak: libncurses.so.5 => /lib/i386-linux-gnu/libncurses.so.5 (0xb76c4000)
    (6:43:54 PM) mtadyshak: libtinfo.so.5 => /lib/i386-linux-gnu/libtinfo.so.5 (0xb76a5000)
    (6:43:54 PM) mtadyshak: libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb768f000)
    (6:43:54 PM) mtadyshak: libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7663000)
    (6:43:54 PM) mtadyshak: libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7647000)
    (6:43:54 PM) mtadyshak: libutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xb7643000)
    (6:43:54 PM) mtadyshak: libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0xb737d000)
    (6:43:54 PM) mtadyshak: libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb7353000)
    (6:43:54 PM) mtadyshak: libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb71a9000)
    (6:43:54 PM) mtadyshak: /arago-2012.10/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7704000)
    (6:43:54 PM) mtadyshak: libssl.so.1.0.0 => /lib/i386-linux-gnu/libssl.so.1.0.0 (0xb7152000)
    (6:43:54 PM) mtadyshak: libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xb6fa7000)
    (6:43:54 PM) mtadyshak: libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6f89000)
    (6:44:29 PM) xdje: The last line is interesting.
    (6:44:41 PM) xdje: They're using a custom ld.so.
    (6:44:42 PM) mtadyshak: so it looks like it can't find libreadline.so
    (6:46:18 PM) xdje: [insert caveat that ldd must be used tentatively when multiple ld.so's are in use]
    (6:50:09 PM) mtadyshak: i'll get back to this tomorrow, thanks!

    ============================================================================================

    MichaelT

  • MichaelT,

    FYI:  I installed CCSv5.3 from scratch on my Ubuntu 10.04 and used SDK 5.06 and i did not have an issue.  My customer, i believe, updated CCS from v5.1 --> v5.3 through help/update.  Maybe something is missed in update process rather than fresh install?

    Thanks.

    Marc

  • Marc and Michael,
    thank you both for investigation of this problem.

    I use Code Composer Studio v5.1.1. (installed from file CCS-5.1.1.00033-Sitara-ARM.tar.gz).

    Where can i get CCS v5.3 - I would like to try it.

    Regards,
    Edo

  • Michael,

    is the latest CCS (v5.3) fully compatible with AM335x SDK's Essentials (ti-sdk-am335x-evm-05.06.00.00-Linux-x86-Install) on this web page http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/sdk/AM335xSDK/latest/index_FDS.html? (if it is compatible - please, update links for AM335x SDK Optional Addons)

    What about setup.sh script - is it compatible with the latest CCS (v5.3), when to run it (before or after CCS installation)?

    Edo

  • Edvard,

    I'll check for the official update but i'm running VMWare-Ubuntu 10.04 LTS, CCSv5.3 and SDK 5.06 with no issues.

    Thanks.

  • Marc,

    what about this issue http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/245089.aspx (3 errors are reported after helloworld project build: skipping incompatible /home/edo/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/../arm-arago-linux-gnueabi/lib/../../lib/libc.so.6 when searching for ../../lib/libc.so.6, ...).

    Do you have this issue when you build helloworld c project - is this issue solved in CCS v5.3?

    Thanks, Edo

  • Try putting both of these lines into your <SDK_INSTALL_PATH>/.gdbinit.  Fill in your username.

    set sysroot /home/<username>/ti-sdk-am335x-evm-05.06.00.00/targetNFS

    set solib-absolute-prefix /home/<username>/ti-sdk-am335x-evm-05.06.00.00/targetNFS

    MichaelT

  • Update:

    We are seeing the GDB issues on Ubuntu 12.04 but not on Ubuntu 10.04.  It is not clear why.

    ./linux-devkit/bin/arm-arago-linux-gnueabi-gdb is actually a shell script.  gdb.real is the executable.

    There are "bashisms" in some of the files in the ./linux-devkit/bin folder that cause GDB not to work.

    The #!/bin/sh shell is dash on Ubuntu (since 9.04)

    To make GDB work, change this file:

    arm-arago-linux-gnueabi-gdb

    from: #!/bin/sh to #!/bin/bash

    All these other files also have the bashism "$BASH_SOURCE" , but we are only concerned with the gdb script.
    lrelease
    lrelease4
    lupdate
    lupdate4
    moc
    moc4
    opkg-cl
    pkg-config
    python
    python2.7
    qdbuscpp2xml
    qdbuscpp2xml4
    qdbusxml2cpp
    qdbusxml2cpp4
    qmake
    qmake2
    rcc
    rcc4
    uic
    uic3
    uic34
    uic4

    MichaelT

  • Is this problem solved in the latest CCS v5.3 (+ SDK 5.06)?
    I will try tomorrow - it is night in Slovenia (0.20).

    Thanks,

    Edo

  • Hello Michael,

    debugging works now - thanks!

    My configuration:

    - PC, OS Ubuntu 12.04.2 LTS

    - all updates for Ubuntu are installed

    - ia32-libs and libjpeg62:i386 are installed

    - Latest AM335x SDK Essentials (ti-sdk-am335x-evm-05.06.00.00-Linux-x86-Install)

    - Latest Code Composer Studio (relase: 5.3.0  build #: 5.3.0.00090 date: Nov 26, 2012)

    - I have changed first line in script  /home/edo/ti-sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-gdb: #!/bin/sh  -- >  #!/bin/bash

    Now I have one small isue: debuger runs normally but it reports Cannot access memory at address 0x0 (in cosole) - what does it mean?

    Regards, Edo

  • Edo:

    I believe that that is a benign error, i.e. you can ignore it.

    I will be talking to someone from the Code Composer team today.

    I will ask if he has an explanation for this.

    MichaelT