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.

Uniflash GDB Server fail

Other Parts Discussed in Thread: CC2650, UNIFLASH

Hello, all.

I'm trying to debug TI SensorTag (CC2650) from Eclipse under Linux 64-bit. My hw debugger is XDS110.

Here is what I have for the moment:

1. Debugging from Windows 64-bit using CCS is fine.

2. I'm able to flash device under Linux using uniflash.sh.

3. Eclipse under Linux enters debug mode successfully, but does not show the source code tab and does not automatically run to main(). When trying to "Run" application, Eclipse fails.

Here is my script to run GDB server:

$ cat sensortag-xds110-dbgsrv.sh 
#!/bin/bash

pushd $(dirname $0) > /dev/null
shdir=$(pwd)
popd > /dev/null

$UNIFLASH_ROOT/ccs_base/common/uscif/gdb_agent_console "$shdir/CC2650_XDS110_linux.dat"

And here is what I receive when run this script:

$ ./sensortag-xds110-dbgsrv.sh 
Successfully configured /home/tau/work/projects/ble/prj/aux/CC2650_XDS110_linux.dat
CPU Name             Port
--------             ----
cortex_m3_0         :55000

Starting all cores
CPU Name             Status
--------             ------
cortex_m3_0          Waiting for client

Then I'm trying to enter debug mode in Eclipse:

cortex_m3_0          Client connected...Connecting to Target
cortex_m3_0 - Processor type =CORTEX_MXX (Little endian)
cortex_m3_0 - Target device is connected
Unable to load libctools.so,  Hardware breakpoints not available.
Target connected...Starting server
ERROR: read_one_register() backend call returned 64
ERROR: read_one_register() backend call returned 64
ERROR: read_one_register() backend call returned 64
ERROR: read_one_register() backend call returned 64
ERROR: read_one_register() backend call returned 64
ERROR: read_one_register() backend call returned 64
ERROR: read_one_register() backend call returned 64
ERROR: read_one_register() backend call returned 64
ERROR: read_one_register() backend call returned 64

There are two questions here: where is libctools.so and what's wrong with read_one_register()?

Then I'm trying to "Run" my application:

FAILED! GTI_RUN_EX(hpid=0x9d894a0,runAttrFlag=0,count0)=-1
(Error -2134 @ 0x0)
Unable to control device execution state. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 6.0.14.5)

And this looks weird for me.

Uniflash version is 3.4.0.00002.

GDB client by Launchpad:

$ arm-none-eabi-gdb -v
GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs

GDB initialization:

mem 0x00 0x20000 ro 32 nocache
mem 0x10000000 0x10020000 ro 32 nocache
mem 0x20000000 0x20005000 rw 32 nocache
mem 0x40000000 0x400E1028 rw 32 nocache
mem 0xE000E000 0xE000F000 rw 32 nocache
target remote localhost:55000

Please, help.

Thank you.

  • Hello Andrey,

    My apologies for the late reply.

    Andrey Serdtsev said:
    Eclipse under Linux 64-bit

    What distro of Linux are you using?

    Andrey Serdtsev said:
    where is libctools.so

    libctools.so (ctools) is the component that allows support for some advanced debugger features like advanced breakpoints. It is located in:

    <CCS INSTALL DIR>/ccsv6/ccs_base/emulation/analysis/bin

    There have been several issues where ctools is causing debugger stability along the lines of what you see. You can try disabling ctools (by renaming the lib) and see if that helps at all.

    Thanks

    ki

  • Hello, Ki.

    Thank you for reply.

    I'm using Xubuntu.

    But this question is no longer actual since I've found suitable workaround:

    1. Use CCS instead of Eclipse.

    2. Switch CCS to existing Eclipse workspace. So you can easily access to your environment without need to setup it again for CCS.

    3. Create project as ordinary C/C++ project. Setup it as usual for cross-compiling project. If project exist, just import it as "Makefile project with existing source code".

    4. To debug, do "Add new file" -> "Target configuration file". Setup it according to your hardware. Test hardware connection.

    5. To create debug configuration, right click newly created configuration file and select "Debug as" -> "Code Composer Debug Session". Then stop debugging and setup newly created debug configuration: setup lookup directories for your source code.

    After that you can comfortably debug your own project (not TI RTOS based) on SensorTag, without crashes, fails and errors.

  • Glad to hear you found a work around and thank you for sharing it!
  • Hi, Andrey.

    I'm trying to setup tools to develop under linux amd64 and bumped into same issues. I switched from Eclipse to CCS, but when i run debug session, debugger can't find symbols. Promts No source available for "0x10003982" .

    Could you help me?

    Regards,

    Mikhail

  • Hi, Mikhail.

    Did you see the flash programming dialog while starting debug session?

    If yes, check if your executable is built with debug symbols.

    If no, define the path to your executable in your debug configuration.

    To do this, select 'Run' > 'Debug Configurations...'. Then in the left part of the dialog window double-click 'Code Composer Studio - Device Debugging' and select your debug configuration node. Then open 'Program' tab, hit 'File System..." button and navigate to your executable (*.elf file). Save changes and try again.

  • Hi, Andrey.

    Thank you for the reply. I've managed to debug with CCSv6. The debugger could not find sources until i've added it to lookup directories list. There is only project settings by default.

    Regards,

    Mikhail