Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenOCD can't find the CMSIS-DAP device, but pyocd can. #75

Open
tmb opened this issue Jan 23, 2023 · 6 comments
Open

OpenOCD can't find the CMSIS-DAP device, but pyocd can. #75

tmb opened this issue Jan 23, 2023 · 6 comments

Comments

@tmb
Copy link

tmb commented Jan 23, 2023

New to hardware and MCUs in general; apologies in advance if there's something obvious going on here.

I have a Picoprobe with the latest firmware which is ostensibly connected correctly to another Pico. I built openocd out of this repo, which fails with the following log when running src/openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -s tcl -d: https://hastebin.com/nahocejomu.apache

The line Debug: 162 16 cmsis_dap_usb_bulk.c:177 cmsis_dap_usb_open(): enumerating interfaces of 0x2e8a:0x0004 is intriguing to me because the Picoprobe is connected to my machine with the vendor ID 0x2e8a.

I tried pyocd after getting this error repeatedly, which has been working well; I'd like to be using openocd, though.

Thanks in advance.

@P33M
Copy link
Contributor

P33M commented Jan 23, 2023

Which instructions are you following?

@tmb
Copy link
Author

tmb commented Jan 26, 2023

Sorry for the delay in response. I'm following the PDF here: https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf

Specifically, I got the error after I hit page 67.

@P33M
Copy link
Contributor

P33M commented Jan 26, 2023

Are you using the release uf2 from this repository?

@BenoitVII
Copy link

BenoitVII commented Nov 11, 2023

Did you manage to solve your issue? I'm facing it right now, I just followed all the instructions for building this repo, building the picoprobe uf2 that I flashed, and I got the same message

src/openocd -f interface/cmsis-dap.cfg -c "adapter speed 5000" -f target/rp2040.cfg -s tcl
---------------------------------------------------------------

Open On-Chip Debugger 0.11.0-g8e3c38f-dirty (2023-11-11-15:56)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (cmsis-dap)
The following debug adapters are available:
1: jlink

The message is the same even if I disconnect the picoprobe.

@fex95
Copy link

fex95 commented Jan 9, 2024

I had the same problem. The command to install the dependencies in getting-started-with-pico.pdf has a line break in it, which means that mingw-w64-x86_64-libusb will not be installed and therefore the cmsis-dap adapter will not be included in the OpenOCD build.

You can install the package later using pacman -S mingw-w64-x86_64-libusb and then perform the configuration and build again.

After the ./configure --disable-werror command, check that the CMSIS-DAP v2 Compliant Debugger is enabled. My output looks like this:

OpenOCD configuration summary
--------------------------------------------------
MPSSE mode of FTDI based devices        yes (auto)
ST-Link Programmer                      yes (auto)
TI ICDI JTAG Programmer                 yes (auto)
Keil ULINK JTAG Programmer              yes (auto)
Altera USB-Blaster II Compatible        yes (auto)
Bitbang mode of FT232R based devices    yes (auto)
Versaloon-Link JTAG Programmer          yes (auto)
TI XDS110 Debug Probe                   yes (auto)
CMSIS-DAP v2 Compliant Debugger         yes (auto)
OSBDM (JTAG only) Programmer            yes (auto)
eStick/opendous JTAG Programmer         yes (auto)
Olimex ARM-JTAG-EW Programmer           yes (auto)
Raisonance RLink JTAG Programmer        yes (auto)
USBProg JTAG Programmer                 yes (auto)
Espressif JTAG Programmer               yes (auto)
Andes JTAG Programmer (deprecated)      no
CMSIS-DAP Compliant Debugger            no
Nu-Link Programmer                      no
Cypress KitProg Programmer              no
Altera USB-Blaster Compatible           no
ASIX Presto Adapter                     no
OpenJTAG Adapter                        no
Linux GPIO bitbang through libgpiod     no
SEGGER J-Link Programmer                yes (auto)
Bus Pirate                              no
Use Capstone disassembly framework      no

@lurch
Copy link

lurch commented Jan 9, 2024

The command to install the dependencies in getting-started-with-pico.pdf has a line break in it, which means that mingw-w64-x86_64-libusb will not be installed

I believe the style used in the Pico / RP2040 databooks is that if a line starts with a $ then it means that it's the start of a new command-line, but if it doesn't start with a $ then it's a continuation of the previous command-line (i.e. it all needs to be typed on a single line). See also raspberrypi/pico-feedback#331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants