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/EVMK2H: K2H onboard XDS200 Connection problem on Ubuntu 16.04

Part Number: EVMK2H

Tool/software: Linux

Hello!
 
We have a problem with JTAG connection in Ubuntu Linux that seems to be a continuation of the related question https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/556346 . In particular, once the on-board XDS2xx debugger is updated from 1.0.0.2 to 1.0.0.8 (this succeeded for us), while CCS will Verify connection under Windows 7 (PC), under Ubuntu (VM) it will not. It seems that we don't have the right rules file(s)?
Our testing environment is two-fold:
  • Machine: 64-bit PC (PC) and Oracle VM VirtualBox 5.2.8 r121009 (Qt5.6.2)
  • OS: Windows 7 Enterprise SP1 (PC) and Ubuntu 16.04 LTS (VM)
  • Software: Code Composer Studio 8.2.0.00007 (Windows 7) and 8.0.0.00016 (Ubuntu)
  • EVM: EVMK2H Rev 40 with onboard XDS2xx debugger (swRev now 1.0.0.8 was 1.0.0.2).
lsusb output is same as related question.
xds2xx_conf returns expected values (same as related question except swRev) in both Windows 7 and in Ubuntu 16.04.
CCS can establish JTAG connection for both Verify and Debug in Windows 7, but CCS gives error in Ubuntu 16.04 for Verify with the same output as related question:
E_RPCENV_IO_ERROR(-6) No connection
Different from the related question are the rules. In the related question:
$ ls /etc/udev/rules.d/
...
71-sd-permissions.rules 
71-ti-permissions.rules
while for us:
$ ls /etc/udev/rules.d/
60-vboxadd.rules
71-ti-permissions.rules
$ lsusb
Bus 001 Device 002: D 0451:bef0 Texas Instruments, Inc.
...
$ grep bef0 /etc/udev/rules.d/71-ti-permissions.rules
ATTRS{idVendor}=="0451",ATTRS{idProduct}=="bef0",ENV{ID_MM_DEVICEIGNORE}=="1"
That doesn't look good to me! Where can we get new rules?
  • Hi Kurt,

    I'm sure you did but I have to ask, just to confirm - did you run the driver install script (install_drivers.sh) after you installed CCS on Ubuntu?

    Assuming you did, you are getting a host connection error as documented below:

    http://software-dl.ti.com/ccs/esd/documents/ccs_debugging_jtag_connectivity_issues.html#host-connection-error

    You already did one of the key things - updating the firmware. Did you check some of the other things mentioned below:

    http://software-dl.ti.com/ccs/esd/documents/xdsdebugprobes/emu_xds200.html#what-are-the-known-issues-

    Note that your connection type "Texas Instruments XDS2xx USB Onboard Debug Probe" since you are using the onboard XDS200. 

    Kurt Baudendistel said:
    $ ls /etc/udev/rules.d/
    ...
    71-sd-permissions.rules 
    71-ti-permissions.rules
    while for us:
    $ ls /etc/udev/rules.d/
    60-vboxadd.rules
    71-ti-permissions.rules

    71-sd-permissions.rules would apply if you installed the spectrum digital drivers. If you did not, then it is fine that it is not there

    Kurt Baudendistel said:
    $ lsusb
    Bus 001 Device 002: D 0451:bef0 Texas Instruments, Inc.
    ...
    $ grep bef0 /etc/udev/rules.d/71-ti-permissions.rules
    ATTRS{idVendor}=="0451",ATTRS{idProduct}=="bef0",ENV{ID_MM_DEVICEIGNORE}=="1"
    That doesn't look good to me! Where can we get new rules?

    I get the same results on my Ubuntu 16.04 machine with my XDS200 (external) debug probe plugged in. It seems fine since I am able to verify my connection and connect to the target using CCSv8

    One thing that you are doing is running Ubuntu in a VM. What VM platform are you using? There are some known issues with various debug probes when running Linux in a VM. Do you have a native Ubuntu machine you can test on?

    Thanks

    ki

  • Thanks for writing back quickly! I hope you write some more!

    Did you run the driver install script?
    >>> I did lots of things after looking at lots of posts I found by googling, and I think I did run one such at one point; was it the right one, I don't know; but if you tell me where the right one is I'll run it again. I know I probably didn't run it on the first pass through things, as I do not have a coherent, single list of things to do to get from A to Z.

    Did you check some of the other things mentioned below?
    >>> I don't see that any of these apply.

    71-sd-permissions.rules would apply if you installed the spectrum digital drivers?
    >>> I don't know what drivers I installed, as most things are happening automagically. I do know that something at some point reported that it was a Spectrum Digital, although I don't see that now anywhere.

    I get the same results on my Ubuntu 16.04 machine with my XDS200 (external) debug probe plugged in. It seems fine since I am able to verify.
    >>> This is not quite the same as my situation, as yours is an external debug probe and mine is an onboard debug probe.
    >>> Your rules say ENV{ID_MM_DEVICEIGNORE}=="1"?
    >>> What does this rule say to do? To ignore bef0 if IGNORE==1? But then, there is no rule for the case of bef0 otherwise? I don't know how these rules work.

    Do you have a native Ubuntu machine you can test on?
    >>> No, else I would have taken to heart the long discussion of why I should not use a VM.

    What VM platform are you using?
    >>> As I wrote: Oracle VM VirtualBox 5.2.8 r121009 (Qt5.6.2). Are you asking something else?

    There are some known issues with various debug probes when running Linux in a VM.
    >>> Is there a list I can read?

    Thanks in advance for more help you can provide!
  • Did you run the driver install script (install_drivers.sh)?
    >>> Yes, ~/ti/ccsv8/install_scripts/install_drivers.sh invokes ti_permissions_install.sh and is (the only place) where 71-ti-permissions.rules comes from.
  • software-dl.ti.com/.../appnote-common_target_configurations.html says:
    Boards with XDS200 Mezzanine debug probe
    Add the following parameters to the new target configuration:

    In the box Connection select the option Texas Instruments XDS2xx USB Onboard Debug Probe.
    In the box Board or Device select the appropriate device: TMS320C6657.

    Board Setting
    C6000 Evaluation Module
    TMDSEVM6657LS TMS320C6657∗
    Keystone 2 Evaluation Modules
    EVMK2H 66AK2H12∗

    *Requires configuring GEL files separately

    I think the above means that for EVMK2H in CCS Project -> New CCS Project... -> Target: one should select 66AK2H12 and not TCI6636K2H (which some other things have seemed to say), along with Connection: Texas Instruments XDS2xx USB Onboard Debug Probe. Okay, but what does "configuring GEL files separately" mean in the context of selecting the Verify... button to try to get the XDS to respond?
  • The following files refer not to 66AK2H12 but to TCI6636K2H:
    ti-processor-sdk-linux*-k2hk-evm-05.00.00.15/bin/program_evm/configs/evmk2h/evmk2h*.ccxml

    I think the above means that for EVMK2H in CCS Project -> New CCS Project... -> Target: one should select TCI6636K2H and not 66AK2H12 (which is the reverse of the previous), along with Connection: Texas Instruments XDS2xx USB Onboard Debug Probe.

    ???
  • Following processors.wiki.ti.com/.../EVMK2H_Hardware_Setup , I find GEL files for DSP and ARM. I do not find GEL files for other in 66AK2H12: PTM, CSSTM, CTETB, CSETB?

    WIth the DSP and ARM GEL files in a .ccxml file, I can View->Target Configurations->Launch Selected Configuration and eventually connect to the DSP. Good. However, there is no Launch Selected Configuration on the left side of CCS, and when I try to Load a program, it disconnects from that connection and cannot connect again. What's up?
  • DSP0 gives Hello, World!

    I don't know how I got it to do that. There is various of the above that still doesn't work.
  • Hi Kurt,
    It sounds like you made some good progress and are able to connect to the target, load and run. Good to hear. It sounded like a target configuration issue (GEL files, etc). You made a mention of "still doesn't work". Is that the issue of the target disconnecting on its own?

    Thanks
    ki
  • Perhaps I should have said "Still doesn't work -- it can connect but it cannot reconnect; and Verify is misleading":

    If the first thing I do after powering on the system (power on Linux VM, power on EVMK2H, and disconnect/connect XDS2xx via USB to PC) is to bring up CCS and Load-Run a program or Debug a project, "Configuring Debugger / Initializing: IcePick_D_0" works, and things continue ("Executing Startup Scripts," etc., and ultimately "Hello World!" output.

    If after the first time I try to do it again, it gets stuck at Configuring Debugger / Initializing: IcePick_D_0 (Cannot be canceled) which takes a few minutes to time out: "Error initializing emulator: (Error -2083 @ 0x0) ... (Emulation package 8.0.27.9)." It does not matter if I Disconnect first, close open CCS, etc.

    If the first thing I do after powering on the system is to Target Configurations->Launch Selected Configuration, that works. And, I can Connect Target and Disconnect Target repeatedly. If I try that Launch a second time ("You are required to terminate existing debug session to perform the current action. Do you want to continue." Select Yes), it gets stuck as above. 

    If the first thing I do after powering on the system is to run xds2xx_conf get xds2xxu 0, I get a response. If I try that a second time, it waits a few minutes and then gives Error : test failed.

    If I mix up the above, it seems that anything I do first works the first time and anything I do later does not.

    If at any time I try File->New->Project->CCS Project->Verify... for Target: 66AK2H12 Connection XDS2xxx USB Onboard, that does not work. Of course, I now understand that it can't work because 66AK2H12.ccxml has no GEL files in it, but there are no other options (such as EVMK2G) in that list that apply. I guess I could add all twelve before I try Verify..., but that is too much work when that button is right there in front of me! An EVMK2H in that list would have made this a lot easier! 

    lsusb always shows the XDS2xx, no matter the above. 

    install_drivers.sh is as you described as works for you.

    Sincerely,

    Kurt