9 years, 10 months ago.

openocd + lpc1768 + cmsis-dap trouble

Hi!

I tried to use the cmsis-dap via openocd on lpc1768, but I receive the next error:

$ sudo openocd -c "interface cmsis-dap" -f /usr/local/share/openocd/scripts/target/lpc1768.cfg

Open On-Chip Debugger 0.7.0-dev-gbd2e229 (2014-06-16-11:19)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.sourceforge.net/doc/doxygen/bugs.html

Info : only one transport option; autoselect 'cmsis-dap'

Info : CMSIS-ADI: cmsis_dap_select

Info : CMSIS-DAP: cmsis_dap_swd_init

Error: Can't find CMSIS-DAP Interface! Please check connection and permissions.

Error: Error selecting 'cmsis-dap' as transport in procedure 'interface'

$

I use the latest firmware - rev 141212. Hidapi and openocd were installed like described here: http://karibe.co.ke/2013/08/setting-up-linux-opensource-build-and-debug-tools-for-freescale-freedom-board-frdm-kl25z/

Please help!

Can you enable more messages to find out why it did not find CMSIS-DAP?

posted by Martin Kojtal 16 Jun 2014

$ sudo openocd -c "interface cmsis-dap" -f tcl/target/lpc1768.cfg -d 3

Open On-Chip Debugger 0.7.0-dev-gbd2e229 (2014-06-16-11:19)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.sourceforge.net/doc/doxygen/bugs.html

User : 11 3 command.c:549 command_print(): debug_level: 3

Debug: 12 3 configuration.c:45 add_script_search_dir(): adding /home/mynzhasova/.openocd

Debug: 13 3 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/site

Debug: 14 3 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/scripts

Debug: 15 3 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface cmsis-dap

Debug: 16 3 command.c:145 script_debug(): command - interface ocd_interface cmsis-dap

Debug: 18 3 command.c:369 register_command_handler(): registering 'ocd_cmsis-dap'...

Info : 19 3 transport.c:118 allow_transports(): only one transport option; autoselect 'cmsis-dap'

Info : 20 3 adi_v5_cmsis_dap.c:327 cmsis_dap_select(): CMSIS-ADI: cmsis_dap_select

Debug: 21 3 command.c:404 register_command(): command 'cmsis-dap' is already registered in '<global>' context

Debug: 22 3 command.c:369 register_command_handler(): registering 'ocd_cmsis-dap'...

Debug: 23 3 command.c:369 register_command_handler(): registering 'ocd_cmsis-dap'...

Info : 24 3 cmsis_dap.c:753 cmsis_dap_swd_init(): CMSIS-DAP: cmsis_dap_swd_init

Error: 25 8 cmsis_dap.c:168 cmsis_dap_usb_open(): Can't find CMSIS-DAP Interface! Please check connection and permissions.

Debug: 26 8 adi_v5_cmsis_dap.c:348 cmsis_dap_select(): can't init CMSIS-DAP driver

Error: 27 8 transport.c:83 transport_select(): Error selecting 'cmsis-dap' as transport

Debug: 28 8 command.c:631 run_command(): Command failed with error code -19

User : 29 9 command.c:669 command_run_line(): in procedure 'interface'

I also tried to do the same with frdm_kl25z (with mbed firmware, which allows cmsis-dap https://mbed.org/handbook/mbed-FRDM-KL25Z-Upgrade) - the result is the same :(

In dmesg I see: ...

[ 1469.723671] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 1469.723676] usb 4-2: Product: MBED CMSIS-DAP

[ 1469.723681] usb 4-2: Manufacturer: MBED

...

posted by Aida Mynzhasova 16 Jun 2014

1 Answer

9 years, 10 months ago.

My openocd was bad.

I was building from this repo: https://github.com/TheShed/OpenOCD-CMSIS-DAP

After building from official source everything works: http://sourceforge.net/p/openocd/code/ci/master/tree/

Accepted Answer

Assigned to Aida Mynzhasova 9 years, 10 months ago.

This means that the question has been accepted and is being worked on.