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/CCSTUDIO: XDS200 "Test connection" usually fails under Linux

Part Number: CCSTUDIO

Tool/software: Linux

I am seldom able to connect to an XDS200 in Linux. 

  1. Ubuntu 18.04
  2. CCS 8.3.1
  3. Ran ~/ti/ccsv8/install_scripts/install_drivers.sh
  4. Same files work under Windows.
  5. OMAP L138 custom board, but uses LCDKOMAPL138
  6. testBoard.dat and LCDKOMAPL138.ccxml  identical to Windows 10 that works.
  7. lsusb output: Bus 001 Device 002: ID 0451:bef0 Texas Instruments, Inc.
  8. /dev/ttyACM0 and /dev/ttyACM1 appear and disappear when emulator is plugged in. Green LED on emulator is lit.

The "Test Connection" button runs the command:

%ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -S integrity

This expands to:

dbgjtag -f ~/.ti/ti/0/0/BrdDat/testBoard.dat -rv -o -S integrity

"testBoard.dat" is identical to version that works under Linux.

Running this command manually, or in CCS hangs and no further output is seen after it runs.

I have been able to run the dbgjtag command one time after rebooting on occasion.  I seem to be able to reliably reproduce it by:

Editing /etc/udev/rules.d/71-ti-permissions.rules.

Adding the entry:

SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="0451",ATTRS{idProduct}=="bef0",MODE:="0666"

And commenting out the line:

#ATTRS{idVendor}=="0451",ATTRS{idProduct}=="bef0",ENV{ID_MM_DEVICE_IGNORE}="1"

After rebooting, I can execute the dbgjtag (above) command once and get a scan successful output.  Also, I can load and debug a C6XXX program into my board.

After disconnecting the emulator USB connection, or rebooting, it does not work again.

To get it to work again, I must copy the original, unmodified udev rules and reboot.  Then copy the "fixed" one and reboot again, then it will work once, (emulator already plugged in). I have tried this twice and it worked both times. This may explain  why re-running install_drivers.sh sometimes appeared to solve my problem when trying other versions of CCS.

Setting udevd to log to syslog, I believe I see the following when it works:

May 23 07:45:15 fir kernel: [ 511.306684] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 23 07:45:15 fir kernel: [ 511.306685] usb 1-1: Product: XDS2xx USB Emulator - Composit
May 23 07:45:15 fir kernel: [ 511.306686] usb 1-1: Manufacturer: Spectrum Digital
May 23 07:45:15 fir kernel: [ 511.306686] usb 1-1: SerialNumber: S200-000E99039000
May 23 07:45:15 fir kernel: [ 511.316786] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
May 23 07:45:15 fir kernel: [ 511.316975] cdc_acm 1-1:1.2: ttyACM1: USB ACM device
May 23 07:45:15 fir kernel: [ 511.317102] usbcore: registered new interface driver cdc_acm
May 23 07:45:15 fir kernel: [ 511.317103] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

Most of the time, when it does NOT work, I see:

May 23 08:05:13 fir ModemManager[1072]: <info> [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1] creating modem with plugin 'Generic' and '2' ports
May 23 08:05:13 fir ModemManager[1072]: <warn> Could not grab port (tty/ttyACM1): 'Cannot add port 'tty/ttyACM1', unhandled serial type'
May 23 08:05:13 fir ModemManager[1072]: <warn> Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type'

I can send the entire syslog which includes the udev ACM0 and ACM1 messages.

  • Correction, the line that says:
    "testBoard.dat" is identical to version that works under Linux.
    Should read:
    "testBoard.dat" is identical to version that works under Windows.
  • After looking further, it looks like the ModemManager was grabbing the ACM0, ACM1 serial ports.

    Stopping the service, and then disabling modem manager with systemctl appears to have resolved the issue.

    sudo systemctl disable ModemManager.service

    I suspect this might happen with any emulator on Ubuntu (18.04 at least).

    I'll mark this as resolved if this continues to work.
  • Hello Dave,

    Thank you for the update, glad to hear you got it working. Please keep us posted.

    Regards,
    Sahin