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.

CCS 6.2.0.00048 under Linux fails to open Blackhawk USB2000 reporting 'SC_ERR_OCS_PORT'

Other Parts Discussed in Thread: TMS320C28346, TMS320F28335

When evaluating CCS 6.2.0.00048 under Linux on CentOS 7 (64-bit) found that was unable to use a Blackhawk USB2000 emulator due to getting a 'SC_ERR_OCS_PORT' error. Example error from a Test Connection:

[Start: Blackhawk USB2000 Controller]

Execute the command:

%ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -F inform,logfile=yes -S pathlength -S integrity

[Result]


-----[Print the board config pathname(s)]------------------------------------

/home/liveuser/.ti/ti_ccs620/0/0/BrdDat/
    testBoard.dat

-----[Print the reset-command software log-file]-----------------------------

This utility has selected a 100- or 510-class product.
This utility will load the adapter 'libbhemujscl.so'.

An error occurred while soft opening the controller.

-----[An error has occurred and this utility has aborted]--------------------

This error is generated by TI's USCIF driver or utilities.

The value is '-118' (0xffffff8a).
The title is 'SC_ERR_OCS_PORT'.

The explanation is:
The hardware or software support only limited values of port addresses.

[End: Blackhawk USB2000 Controller]

loadti also fails to use the Blackhawk USB2000 Controller (not a permissions problem since also fails if run under sudo):

$ strace -f -o usb2000-user.log ti_ccs620/ccsv6/ccs_base/scripting/examples/loadti/loadti.sh -c workspace_v6_2/TMS320C28346_hello/targetConfigs/TMS320C28346.ccxml workspace_v6_2/TMS320C28346_hello/Debug/TMS320C28346_hello.out

***** DSS Generic Loader *****

START: 21:32:29 GMT+0200 (CEST)

Configuring Debug Server for specified target...
Done
TARGET: Blackhawk USB2000 Controller
Connecting to target...
SEVERE: C28xx: Error connecting to the target: (Error -118 @ 0x0) The hardware or software support only limited values of port addresses. (Emulation package 6.0.83.0) 

SEVERE: emulation failure occurred
SEVERE: Error connecting to the target: emulation failure occurred
Error code #4001, could not connect to target!
Aborting!

END: 21:32:30 GMT+0200 (CEST)

From trying different combinations think the problem is an issue with the Blackhawk USB2000 CCS 6.2.0 64-bit driver under Linux since:

a) Trying to use the Blackhawk USB2000 with CCS 6.2.0 under Ubuntu 14.04 64-bit fails with the same 'SC_ERR_OCS_PORT' as with CCS 6.2.0 under CentOS 7 64-bit.

b) With CCS 6.2.0 on CentOS 7 or Ubuntu if a change from the using a Blackhawk USB2000 to a XDS100v2, using the same TMS320C28346 Control card, then can successfully run a test connection and download a program.

c) With CCS 6.2.0 under Windows 7 64-bit or CCS 6.1.3 under CentOS 6 64-bit can successfully use a Blackhawk USB2000.

Attached is a strace log of the failed attempt to use a Blackhawk USB2000 with loadti under CentOS 7 64-bit. usb2000-user.zip

From looking at the strace log think the problem is that thread 14647, which is ccsv6/ccs_base/common/uscif/bh510usb_server, crashes with a SIGSEGV (segmentation fault). strace log at the point of the SIGSEGV:

14647 munmap(0x7f30883af000, 4096)      = 0
14647 open("/sys/bus/usb/devices/1-1.4.2/descriptors", O_RDONLY) = 9
14647 read(9, "\22\1\20\1\0\0\0\0100\4\5\0\0\2\0\0\0\1", 18) = 18
14647 close(9)                          = 0
14647 getdents(8, /* 0 entries */, 32768) = 0
14647 close(8)                          = 0
14647 open("/dev/bus/usb/002/004", O_RDWR) = 8
14647 ioctl(8, SNDRV_CTL_IOCTL_TLV_READ or USBDEVFS_GET_CAPABILITIES, 0x1a4331c) = 0
14647 write(5, "\1", 1)                 = 1
14647 read(4, "\1", 1)                  = 1
14647 open("/sys/bus/usb/devices/\20\270\244\1/descriptors", O_RDONLY) = -1 ENOENT (No such file or directory)
14647 write(5, "\1", 1)                 = 1
14647 read(4, "\1", 1)                  = 1
14647 close(8)                          = 0
14647 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---

When the strace of the loadti was taken the USB2000 was enumerated as Bus 002 Device 004. The strace log prior to the SIGSEGV shows that /dev/bus/usb/002/004 has been opened. Therefore, it appears the driver is correctly finding the USB2000 on the USB bus but crashes for some reason.

[As an aside I started the investigation using a TMS320F28335 Control Card, but somehow managed to "fry" the TMS320F28335 on two control cards. Think I accidentally shorted out something on baseboard for the control card, and so can't blame the broken hardware on the software.]

  • Chester,

    I found out that I get the Error -118 in the first attempt to talk to the pod. I did two tests:

    - Connect to the target from within CCS shows the error, but a simple click on "retry" allowed me to connect without a problem. After that running the "Test Connection" causes it to finish without problems.

    - Running the "Test Connection" first also brings up the error. However, either re-running the "Test Connection" or launching the debugger clears it.

    That happens with both the USB2000 and the USB510L and I am thinking something is not being properly initialized in the pod.

    In this case I will contact Blackhawk and let them know about this behavior.

    I apologize for the inconvenience,
    Rafael
  • desouza said:
    I found out that I get the Error -118 in the first attempt to talk to the pod.

    With CCS 6.2.0.00048 found that get different behavior depending upon the operating system:

    1) With CentOS 7.1 64-bit the "Test Connection" and a debug session with a USB2000 fail every time.

    2) With Ubuntu 14.04.3 LTS 64-bit the first "Test Connection" or debug session fails after the USB2000 has been enumerated (plugged in), but subsequent attempts work.