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.]