LPC-Link2 Not Working as CMSIS-DAP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC-Link2 Not Working as CMSIS-DAP

1,657 Views
donald1
Contributor I

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

Tags (2)
0 Kudos
3 Replies

1,395 Views
donald1
Contributor I

Also I just tried this on another Windows 10 computer that had not previously had any of the drivers installed and it gives me the same error with a slightly different debug output.

.\openocd.exe -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 0 command.c:544 command_print(): debug_level: 4
Info : 15 16 server.c:311 add_service(): Listening on port 6666 for tcl connections
Info : 16 16 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 16 command.c:143 script_debug(): command - init ocd_init
Debug: 20 32 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 21 32 command.c:143 script_debug(): command - ocd_target ocd_target init
Debug: 23 32 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target names
Debug: 24 32 command.c:143 script_debug(): command - ocd_target ocd_target names
Debug: 25 32 target.c:1410 handle_target_init_command(): Initializing targets...
Debug: 26 1079 cmsis_dap_usb.c:409 cmsis_dap_usb_xfer(): error reading data: (null)
Error: 27 1079 cmsis_dap_usb.c:503 cmsis_dap_cmd_DAP_Info(): CMSIS-DAP command CMD_INFO failed.
Debug: 28 1094 command.c:651 run_command(): Command 'init' failed with error code -107
User : 29 1110 command.c:715 command_run_line():

0 Kudos

1,395 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Donald Bailey,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
It seems a bit weird. Whether you try to use the LPC-link2 to program the LPC824-MAX board via the MCUXpresso IDE, if not, please give a try. In addition, JP1 should be closed when using an external debug probe to connect the P5 connector.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,395 Views
donald1
Contributor I

Hi Jerry,

The LPC-Link2 does work when I use it with MCUXpresso so it would appear to be something to do with how OpenOCD interacts with the LPC-Link2. I am not using MCUXpresso for this project but rather VisualGDB and OpenOCD. I have also tried the LPC-Link2 with the Jlink firmware loaded and it also works but the licencing terms make it unsuitable for a commercial project.

Also you are correct, what I originally wrote about JP1 on the LPC824-MAX was incorrect.

Thanks,

Donald

0 Kudos