Hi,
Hoping for some assistance in rectifying an issue using LPC-Link2 with VirtualBox.
Host: Pop!OS 18.04 LTS
Guest OS: Ubuntu 16.04 Xenial under Vagrant.
Summary:
The LPC-Link2 works correctly on the host Linux OS directly.
The LPC-Link2 with CMSIS-DAP does NOT work correctly under VirtualBox.
The LPC-Link2 with alternate JLink software works correctly under VirtualBox.
Other DAPLINK interfaces (e.g. NXP Kinetis freedom boards) work correctly under VirtualBox.
I have taken USBMON captures at the host with both the non-VirtualBox (working) configuration and VirtualBox (not working) configurations. These are shown below. It looks like the DAP capability request is being sent from the VM but the LPC-Link2 will not respond correctly to it. In fact, the LPC-Link2 continues to send empty data until the board is disconnected.
Any help in rectifying or letting me know where to continue looking would be much appreciated.
I'd be pleased to provide any additional info or additional testing as required.
On Local Linux (no VirtualBox)
phil@pop-os:~/kinetis$ lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 1fc9:0090 NXP Semiconductors
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1024 Silicon Motion
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
phil@pop-os:~/kinetis$ openocd -f interface/cmsis-dap.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: Interface Initialised (JTAG)
Info : CMSIS-DAP: FW Version = 1.10
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Error: CMSIS-DAP command CMD_DAP_SWJ_CLOCK failed.
Communication works correctly. (ignore failure message, this is related to not setting interface speed in openocd. You can observe correct response to the "00f0" capability request below, the line starting with 000113, which inducates support for SWD and JTAG)
In VirtualBox (but keeping USBMON in same position on the host)
On the VM
vagrant@ubuntu-xenial:~$ openocd -f interface/cmsis-dap.cfg
Open On-Chip Debugger 0.10.0+dev-00920-g6ea4372 (2019-06-23-11:11)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: CMSIS-DAP command CMD_INFO failed.
vagrant@ubuntu-xenial:~$
On the Host
phil@pop-os:~/kinetis$ lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 007: ID 1fc9:0090 NXP Semiconductors
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1024 Silicon Motion
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
phil@pop-os:~/kinetis$ sudo cat /sys/kernel/debug/usb/usbmon/3u > ~/usb.vm.out
^C
phil@pop-os:~/kinetis$ wc -l ~/usb.vm.out
1006 /home/phil/usb.vm.out
phil@pop-os:~/kinetis$ head -30 ~/usb.vm.out
ffff883b8ae526c0 3916360551 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae52540 3916398115 S Io:3:007:1 -115:8 64 = 00f00000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffff883b8ae52540 3916398523 C Io:3:007:1 0:8 64 >
ffff883b8ae526c0 3916398633 C Ii:3:007:1 0:8 0
ffff883b94ed6b40 3916399999 S Ii:3:007:1 -115:8 1024 <
ffff883b94ed6b40 3916400637 C Ii:3:007:1 0:8 0
ffff883b8ae526c0 3916401993 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae526c0 3916402639 C Ii:3:007:1 0:8 0
ffff883b8ae52540 3916403941 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae52540 3916404671 C Ii:3:007:1 0:8 0
ffff883b8ae52840 3916405969 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae52840 3916406669 C Ii:3:007:1 0:8 0
ffff883b8ae52900 3916407959 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae52900 3916408708 C Ii:3:007:1 0:8 0
ffff883b8ae52e40 3916410056 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae52e40 3916410707 C Ii:3:007:1 0:8 0
ffff883b8ae520c0 3916412060 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae520c0 3916412633 C Ii:3:007:1 0:8 0
ffff883b8ae520c0 3916413934 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae520c0 3916414672 C Ii:3:007:1 0:8 0
ffff883b94ed6b40 3916416068 S Ii:3:007:1 -115:8 1024 <
ffff883b94ed6b40 3916416670 C Ii:3:007:1 0:8 0
ffff883b94ed60c0 3916417941 S Ii:3:007:1 -115:8 1024 <
ffff883b94ed60c0 3916418662 C Ii:3:007:1 0:8 0
ffff883b94ed6540 3916419899 S Ii:3:007:1 -115:8 1024 <
ffff883b94ed6540 3916420669 C Ii:3:007:1 0:8 0
ffff883b807dde40 3916421936 S Ii:3:007:1 -115:8 1024 <
ffff883b807dde40 3916422641 C Ii:3:007:1 0:8 0
ffff883b8ae520c0 3916423997 S Ii:3:007:1 -115:8 1024 <
ffff883b8ae520c0 3916424708 C Ii:3:007:1 0:8 0
phil@pop-os:~/kinetis$
The "jabberring" from the LPC-Link2 continues indefinitely and the capture file becomes very large, requires disconnection and reconnection to stop. The LPC-Link seems to have become stuck in some sort of loop as a result of the Capabilities request when sent from VirtualBox.
Hi, Hoping for some assistance in rectifying an issue using LPC-Link2 with VirtualBox. Host: Pop!OS 18.04 LTS Guest OS: Ubuntu 16.04 Xenial under Vagrant.
Summary:
I have taken USBMON captures at the host with both the non-VirtualBox (working) configuration and VirtualBox (not working) configurations. These are shown below. It looks like the DAP capability request is being sent from the VM but the LPC-Link2 will not respond correctly to it. In fact, the LPC-Link2 continues to send empty data until the board is disconnected.
Any help in rectifying or letting me know where to continue looking would be much appreciated. I'd be pleased to provide any additional info or additional testing as required.
On Local Linux (no VirtualBox)
Communication works correctly. (ignore failure message, this is related to not setting interface speed in openocd. You can observe correct response to the "00f0" capability request below, the line starting with 000113, which inducates support for SWD and JTAG)
In VirtualBox (but keeping USBMON in same position on the host)
On the VM
On the Host
The "jabberring" from the LPC-Link2 continues indefinitely and the capture file becomes very large, requires disconnection and reconnection to stop. The LPC-Link seems to have become stuck in some sort of loop as a result of the Capabilities request when sent from VirtualBox.