AnsweredAssumed Answered

LPC-Link2 Not Working as CMSIS-DAP

Question asked by Donald Bailey on Oct 3, 2019
Latest reply on Oct 14, 2019 by Donald Bailey

Hi,

I have just received a LPC-Link2 that I am hoping to use as a CMSIS-DAP debugger with OpenOCD to program some LPC824 series microcontrollers. I have flashed the LPC-Link2 with the CMSIS-DAP firmware using the LPCScrypt utility but I am unable to talk to it using OpenOCD. I keep getting a "CMSIS-DAP command CMD_INFO failed." error.

 

I know that OpenOCD is working because I have been using the LPCXpresso824-MAX board as a CMSIS-DAP debugger for the on board LPC824 and it works fine. I have tried both running OpenOCD to talk to the LPC-Link2 without any target connected and with the LPC-Link2 connected to the external debug probe header of the LPCXpresso824-MAX with the jumper closed to select the external debugger. In both cases OpenOCD behaves the same.

 

It appears that OpenOCD is unable to talk to the LPC-Link2. I have tried uninstalling and reinstalling the drivers, rebooting my computer, and reflashing the LPC-Link2 multiple times. Should OpenOCD be working with the LPC-Link2? Can anyone help?

 

Here is some version information:

Windows 10

OpenOCD 0.10.0

LPC-LinkII UCom driver 2.0.0.0

LPCSctypt 2.1.0_842

 

Running OpenOCD with the LPC-Link2 connected to the LPCXpresso824-MAX gives:

.\openocd -f interface/cmsis-dap.cfg -c "debug_level 4"

GNU MCU Eclipse OpenOCD, 64-bitOpen On-Chip Debugger 0.10.0+dev-00593-g23ad80df4 (2019-04-22-20:25)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 14 6 command.c:544 command_print(): debug_level: 4
Info : 15 11 server.c:311 add_service(): Listening on port 6666 for tcl connections
Info : 16 15 server.c:311 add_service(): Listening on port 4444 for telnet connections
Debug: 17 19 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 18 22 command.c:143 script_debug(): command - init ocd_init
Debug: 20 24 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 21 28 command.c:143 script_debug(): command - ocd_target ocd_target init
Debug: 23 30 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target names
Debug: 24 34 command.c:143 script_debug(): command - ocd_target ocd_target names
Debug: 25 36 target.c:1410 handle_target_init_command(): Initializing targets...
Debug: 26 69 cmsis_dap_usb.c:251 cmsis_dap_usb_open(): Cannot read product string of device 0x46d:0xc232
Debug: 27 74 cmsis_dap_usb.c:251 cmsis_dap_usb_open(): Cannot read product string of device 0x46d:0xc231
Debug: 28 1084 cmsis_dap_usb.c:409 cmsis_dap_usb_xfer(): error reading data: (null)
Error: 29 1092 cmsis_dap_usb.c:503 cmsis_dap_cmd_DAP_Info(): CMSIS-DAP command CMD_INFO failed.
Debug: 30 1102 command.c:651 run_command(): Command 'init' failed with error code -107
User : 31 1110 command.c:715 command_run_line():

 

Running OpenOCD with the LPCXpresso824-MAX built in debugger gives:

.\openocd -f interface/cmsis-dap.cfg -c "debug_level 4"
GNU MCU Eclipse OpenOCD, 64-bitOpen On-Chip Debugger 0.10.0+dev-00593-g23ad80df4 (2019-04-22-20:25)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 14 6 command.c:544 command_print(): debug_level: 4
Info : 15 10 server.c:311 add_service(): Listening on port 6666 for tcl connections
Info : 16 13 server.c:311 add_service(): Listening on port 4444 for telnet connections
Debug: 17 16 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 18 20 command.c:143 script_debug(): command - init ocd_init
Debug: 20 22 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 21 25 command.c:143 script_debug(): command - ocd_target ocd_target init
Debug: 23 28 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target names
Debug: 24 31 command.c:143 script_debug(): command - ocd_target ocd_target names
Debug: 25 32 target.c:1410 handle_target_init_command(): Initializing targets...
Info : 26 63 cmsis_dap_usb.c:874 cmsis_dap_get_caps_info(): CMSIS-DAP: SWD Supported
Info : 27 63 cmsis_dap_usb.c:854 cmsis_dap_get_version_info(): CMSIS-DAP: FW Version = 1.10
Info : 28 79 cmsis_dap_usb.c:839 cmsis_dap_get_serial_info(): CMSIS-DAP: Serial# = 09023012
Error: 29 79 cmsis_dap_usb.c:999 cmsis_dap_init(): CMSIS-DAP: JTAG not supported
Debug: 30 79 command.c:651 run_command(): Command 'init' failed with error code -107
User : 31 79 command.c:715 command_run_line():

 

Regards,

Donald

Outcomes