Open wdevore opened 2 years ago
hello, try add sudo before your command
Instructions for linux using openocd 0.11.0
1 when compiling, you need to add support for cmsis-dap
$./configure --enable-cmsis-dap
2 add 2 lines to cmsis-dap.cfg
cmsis_dap_backend hid
transport select swd
3 command for reference
$sudo ./src/openocd -s tcl -f tcl/interface/cmsis-dap.cfg -f tcl/target/stm32f1x.cfg
After researching more I found what I think is a mistake in the cmsis-dap.cfg file. It appears to have spaces in the cmsis parameter:
cmsis_ dap_ backend hid
and it should be cmsis_dap_backend hid
Once I fixed that it seems to find my device based on the serial number:
sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "program test_project.elf verify reset exit"
Open On-Chip Debugger 0.11.0-g228ede4-dirty (2022-09-24-15:24)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
swd
Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 0256
Info : CMSIS-DAP: Serial# = 0700000100420019390000084e50364aa5a5a5a597969908
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Error: CMSIS-DAP command CMD_DAP_SWJ_CLOCK failed.
Error: No Valid JTAG Interface Configured.
Yet it still fails!
This is my .cfg file:
#
# ARM CMSIS-DAP compliant adapter
#
# http://www.keil.com/support/man/docs/dapdebug/
#
adapter driver cmsis-dap
# Optionally specify the serial number of CMSIS-DAP usb device.
#cmsis_dap_serial 02200201E6661E601B98E3B9
#cmsis_dap_serial 0700000100420019390000084e50364aa5a5a5a597969908
cmsis_dap_backend hid
transport select swd
Why does it error on both the CLOCK and JTAG when the .cfg file says swd ????
I even tried stm32f1x.cfg as the target and it still fails:
sudo openocd -f interface/cmsis-dap.cfg -f target/stm32f1x.cfg -c "program test_project.elf verify reset exit"
[sudo] password for iposthuman:
Open On-Chip Debugger 0.11.0-g228ede4-dirty (2022-09-24-15:24)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
swd
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 0256
Info : CMSIS-DAP: Serial# = 0700000100420019390000084e50364aa5a5a5a597969908
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Error: Error connecting DP: cannot read IDR
Info : DAP init failed
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked
Hello, please check the wiring and power supply, The log shows that the DAP itself is OK, but the target chip is not detected (usually a wiring problem)
hello, try add sudo before your command
This works for me. Is there a group I could add the my user to (in my case it's impractical running openocd as root)? It seems like (at least in my case) a permission problem.
I can't seem to load the basic Blinky example via the board's DAPlink. I can upload to the Pico directly just fine but not with the baseboard. This is the error i get:
I noticed that the product-string (above) doesn't match what
``dmesg
says (below):I tried manually putting the serial number in the cmsis config file but that didn't help.
Thoughts? I'm on a Linux box.
Thanks.