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.

CC2650 : XDS100 v3 plug-in for Eclipse and GDB launch command.

Other Parts Discussed in Thread: CC2538, CC2650, SEGGER, CC2560

Currently working on CC2650 and as part of tool chain we are using BTLE stack V2.0, XDS100v3 and Eclipse makefile project environment using ti-cgt-arm_5.2.2.

We are successfully created the makefile project in eclipse and it is working fine.

But i am not able to start the Debugging because i don't know how do add the XDS100 debug tool into Eclipse.

I have followed the steps mentioned in the below link :

http://processors.wiki.ti.com/index.php/XDS_GDB_Agent

in this how i can launch GDB ? what is the command to launch GDB?

is there any Eclipse plug-in available for XDS100v3 debugger?

Could you people provide me some suggestion ?

Thanks & regards,

jayachandran R

  • Hi,

    I think the XDS100v3 is supported with the GDB agent included with the XDS100v3 Emu pack driver (typically installed to c:\ti\ccs_base).

    We have a document describing how to set this up with CC2538, it should be fairly similar for CC26XX: http://www.ti.com/lit/an/swra443a/swra443a.pdf

    Adding the Tools team to this thread in case they have more details. Let us know if you have any questions.

    Regards,

    Svend

  • hi Svend

    Thanks for your reply .

    With reference to www.ti.com/.../swra443a.pdf

    i did following Eclipse debug configuration settings :

    - GDB Hardware Debugging plugin
    - Main Tab :
    C/C++ Application : path of .out file
    - Debugger :
    GDB Command : path of arm-none-eabi-gdb.exe (Using Legacy GDB Hardware Debugging Launcher)
    - Startup :
    mem 0x0200000 0x0280000 ro 32 nocache
    - target remote localhost:55000

    i got following error in GDB console and Eclipse console.

    Error in GDB console :

    C:\ti\ccsv6\ccs_base\common\uscif>set GDB_AGENT_DISPLAY_LEVEL=6

    C:\ti\ccsv6\ccs_base\common\uscif>gdb_agent_console.exe CC2650_XDS100v3c2.dat
    CreateDriver() called
    Creating GTI driver. Driver=C:\ti\ccsv6\ccs_base\common\uscif\..\..\\emulation\d
    rivers\\tixds510cortexm.dvr,board=cc2650_xds100v3c2, cpu=cortex_m3_0,connection=
    0
    Loaded C:\ti\ccsv6\ccs_base\common\uscif\..\..\\emulation\drivers\\tixds510corte
    xm.dvr.
    Successfully configured CC2650_XDS100v3c2.dat
    CPU Name Port
    -------- ----
    cortex_m3_0 :55000

    Starting all cores
    CPU Name Status
    -------- ------
    cortex_m3_0 Waiting for client
    cortex_m3_0 Client connected...Connecting to Target
    cortex_m3_0 - Processor type =CORTEX_MXX (Little endian)
    cortex_m3_0 - Target device is connected
    cortex_m3_0 - Target device halted because of user request
    cortex_m3_0 - General Capabilities=0x11da041b
    cortex_m3_0 - Emulation Capabilities=0x17
    Calling ctools Get cToolsManager
    Calling ctools Get Job Mgr
    Target connected...Starting server
    >>>> %+$qSupported:multiprocess+;qRelocInsn+#2a
    <<<< +
    <<<< $QStartNoAckMode+;PacketSize=3f0#0f
    >>>> %+$QStartNoAckMode#b0
    <<<< +
    <<<< $OK#9a
    >>>> %+$Hg0#df
    <<<< $OK#00
    >>>> %$?#3f
    <<<< $T050f:7a600000;#00
    >>>> %$Hc-1#09
    <<<< $OK#00
    >>>> %$qC#b4
    <<<< $QC0#00
    >>>> %$qAttached#8f
    <<<< $1#00
    >>>> %$qOffsets#4b
    <<<< $#00

    Error in Eclipse console :

    Reading symbols from c:\workspace…\blink_led.out...done.
    (gdb) mem 0x0200000 0x0280000 ro 32 nocache
    (gdb) set remotetimeout 20
    (gdb) target remote localhost:55000
    Remote debugging using localhost:55000

    Then a window saying “ arm-none-eabi-gdb.exe has stopped working “ gets displayed and terminates.

    Regards,
    jayachandran R
  • Hi,

    Here is a document describing how to use GDB for CC26xx: www.ti.com/.../swra446.pdf

    Can you try looking at this instead?

    For CC2650 there is some different settings in the debug configuration, in order to get the correct read/write access:

    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

    Regards,

    Ida

  • Hi Ida,

    Thanks for your reply.

    we verified with the link www.ti.com/.../swra446.pdf and used following start-up configuration

    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

    When debug is done with this configuration (other tabs remain the same as before) , the following are observed.

    GDB Console :


    C:\ti\ccsv6\ccs_base\common\uscif>set GDB_AGENT_DISPLAY_LEVEL=6

    C:\ti\ccsv6\ccs_base\common\uscif>gdb_agent_console.exe CC2650_XDS100v3c2.dat
    CreateDriver() called
    Creating GTI driver. Driver=C:\ti\ccsv6\ccs_base\common\uscif\..\..\\emulation\d
    rivers\\tixds510cortexm.dvr,board=cc2650_xds100v3c2, cpu=cortex_m3_0,connection=
    0
    Loaded C:\ti\ccsv6\ccs_base\common\uscif\..\..\\emulation\drivers\\tixds510corte
    xm.dvr.
    Successfully configured CC2650_XDS100v3c2.dat
    CPU Name Port
    -------- ----
    cortex_m3_0 :55000

    Starting all cores
    CPU Name Status
    -------- ------
    cortex_m3_0 Waiting for client
    cortex_m3_0 Client connected...Connecting to Target
    cortex_m3_0 - Processor type =CORTEX_MXX (Little endian)
    cortex_m3_0 - Target device is connected
    cortex_m3_0 - Target device halted because of user request
    cortex_m3_0 - General Capabilities=0x11da041b
    cortex_m3_0 - Emulation Capabilities=0x17
    Calling ctools Get cToolsManager
    Calling ctools Get Job Mgr
    Target connected...Starting server
    >>>> %+$qSupported:multiprocess+;qRelocInsn+#2a$qSupported:multiprocess+;qRelocI
    nsn+#2a$qSupported:multiprocess+;qRelocInsn+#2a
    <<<< +
    <<<< $QStartNoAckMode+;PacketSize=3f0#0f
    >>>> %+$QStartNoAckMode#b0
    <<<< +
    <<<< $OK#9a
    >>>> %+$Hg0#df
    <<<< $OK#00
    >>>> %$?#3f
    <<<< $T050f:5e3a0000;#00
    >>>> %$Hc-1#09
    <<<< $OK#00
    >>>> %$qC#b4
    <<<< $QC0#00
    >>>> %$qAttached#8f
    <<<< $1#00
    >>>> %$qOffsets#4b
    <<<< $#00

    Eclipse error message :

    Reading symbols from c:\workspace…\blink_led.out...done.
    (gdb) mem 0x00 0x20000 ro 32 nocache
    (gdb) mem 0x10000000 0x10020000 ro 32 nocache
    (gdb) mem 0x20000000 0x20005000 rw 32 nocache
    (gdb) mem 0x40000000 0x400E1028 rw 32 nocache
    (gdb) mem 0xE000E000 0xE000F000 rw 32 nocache
    (gdb) target remote localhost:55000
    Remote debugging using localhost:55000

    Then a window saying “ arm-none-eabi-gdb.exe has stopped working “ gets displayed and terminates.

    we found same problem thread in e2e community search ,link : e2e.ti.com/.../320888
    In that case program control reaches main and followed by showing these same errors, but in my case program control not even reaches the main and showing the same error

    Please help on this issue.

    Regards,
    jayachandran R
  • Hi,

    I have experienced that the gcc/gdb setup is a bit sensitive for combinations of the software versions being used. Are you using the same versions of the software as in the app note? In CCS you can go to help->Check for updates to update the TI emupack if you don't have the latest version. 

    I havn't experienced that the arm-none-eabi-gdb.exe has crashed before, but maybe you can find something in forums on the  website?

    Regards,

    Ida

  • hi ida,

    Thanks for your reply.

    In my eclipse project i am using the TI-ARM compiler to generate the hex and .out file.

    will the GDB debugger supports TI-ARM compiler (ti-cgt-arm_5.2.2) in eclipse environment ?

    if supports provide me some app note.

    because the application note says only for GCC/GDP.

    please provide me suggestion on this.

    Regards,

    Jayachandran R

  • I have not tried debugging programs compiled with other compilers than GCC. To debug an application with GDB it is required that the application is compiled to include GNU compatible debugging information, like dwarf. With GCC you can use the compile option -gdwarf-2, are you using something similar?

    I don't think Eclipse is the problem here. You can verify that by running the gdb debugger without eclipse.

    Go to the folder where it is installed and type these commands to see if you get a connection:

    arm-none-eabi-gdb.exe
    symbol-file <your blink_led.out file>
    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

    Regards,
    Ida
  • Hi Ida,
    we tried to test the sample Led blink Application which is given in the Application Note" www.ti.com/.../swra446"
    But it gives the compilation error.please see the log below


    c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: ../../bin/gcc/blink_led.elf section `.ccfg' will not fit in region `FLASH_CCFG'
    c:/program files (x86)/gnu tools arm embedded/4.9 2015q1/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `FLASH_CCFG' overflowed by 4 bytes
    collect2.exe: error: ld returned 1 exit status
    make: *** [blink_led.elf] Error 1

    Hope the sample Application should be tested and verified at your end.
    Then may i know why I am getting this compilation error?

    With regards,
    Thangaraj.P
  • Hi,

    Unfortunatly, there is an error in the linker file attached with the example. 

    I have attached a corrected one here (just remove the .txt extention before using it).

    2117.cc26x0f128.lds.txt
    /*
     @file       cc26x0f128.lds
     @brief      CC26x0F128 linker configuration file for GNU compiler.
    
     @Revised     $Date: 2014-06-06 09:59:22 +0200 (fr, 06 jun 2014) $
     @Revision    $Revision: 13151 $
    
      Copyright (C) 2014 Texas Instruments Incorporated - http:www.ti.com/
    
    
      Redistribution and use in source and binary forms, with or without
      modification, are permitted provided that the following conditions
      are met:
    
        Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
    
        Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.
    
        Neither the name of Texas Instruments Incorporated nor the names of
        its contributors may be used to endorse or promote products derived
        from this software without specific prior written permission.
    
      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
      LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
      A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
      OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
      SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
      LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
      DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
      THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
      OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    
    /*. Entry Point *./
    ENTRY( ResetIsr )
    
    /* System memory map */
    MEMORY
    {
        /* Application stored in and executes from internal flash */
        /* Flash Size 128 KB */
        FLASH (RX) : ORIGIN = 0x0, LENGTH = 0x0001FFAC
        /* Customer Configuration Area and Bootloader Backdoor configuration in flash, 80 bytes*/
        FLASH_CCFG (RX) : ORIGIN = 0x1FFAC, LENGTH = 84
        /* Application uses internal RAM for data */
        /* RAM Size 20 KB */
        SRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 0x5000
    }
    
    /*. Highest address of the stack. Used in startup file .*/
    _estack = ORIGIN(SRAM) + LENGTH(SRAM); /*end of SRAM .*/
    
    /*. Generate a link error if heap and stack don’t fit into RAM .*/
    _Min_Heap_Size = 0;
    _Min_Stack_Size = 0x100;
    
    
    /* Section allocation in memory */
    SECTIONS
    {
        .text :
        {
            _text = .;
            KEEP(*(.vectors))
            *(.text*)
            *(.rodata*)
            _etext = .;
        } > FLASH= 0
        .data : AT(ADDR(.text) + SIZEOF(.text))
        {
            _data = .;
            *(vtable)
            *(.data*)
            _edata = .;
        } > SRAM
        .bss :
        {
            _bss = .;
            *(.bss*)
            *(COMMON)
            _ebss = .;
        } > SRAM
        .ccfg :
        { 
        } > FLASH_CCFG
        /* User_heap_stack section, used to check that there is enough RAM left */
        ._user_heap_stack :
        {
          . = ALIGN(4);
          . = . + _Min_Heap_Size;
          . = . + _Min_Stack_Size;
          . = ALIGN(4);
        } >SRAM
    }
    
    
    

    Regards,

    Ida

  • Hi Ida,
    Thanks for your response.
    Now i can able to build and debug using arm gdb.
    But i am not able to stop at main.
    Its stopped at file cpu.c line no:394 .these lines are given below

    __asm(" subs r0, #1\n"
    " bne NOROM_CPUdelay\n"
    " bx lr");

    could you please help to stop at main?

    Regards,
    Thangaraj.P
  • Hi,
    This is not supported yet, but the team responsible for the GDB agent is currently working on it. 

    Regards,
    Ida

  • I could not access this link e2e.ti.com/.../417374. Permission denied for that link.
    Now you are saying that this is not supported and responsible team is working for that.
    How you gave it for reference without Testing at your end?
    we tried with sample code but no output at the end.completely waste of time.
    Please dont divert by giving useless examples.

    Regards,
    Thangaraj.P
  • Hi Jayachandran,

    I'm working on cc2560 on linux platform. I do not want to use ccs. If ccs was availabel as an eclipse plugin I would add it to my current eclipse install, but for ccs 6 it isn't possible. Currently I'm using a makefile project with arm-none-eabi toolchain and segger jlink in Eclipse IDE. It works, but now I need to write a makefile from ccs in order to get BLE stack. I read you did it with ti compiler, could you share it?

    lah
  • I just went through the TI compiler user guide, i got all compiler and linker option from that user guide.
    for reference :
    www.ti.com/.../spnu151j.pdf
    processors.wiki.ti.com/.../Projects_and_Build_Handbook_for_CCS
    right now i don´t have the make file backup.
    Jayachandran R