-
Hello,
I have loaded on the debugged rp2040 blink by file transfer. After I try to debug it with OpenOCD blinking stops until hard reset. It seems this error prevents me from loading binaries onto rp2040 with the use of DAP or even connecting to gdb (halt error). I am new to debugging with DAP and OpenOCD. Anyone encountered such thing or can give me some pointers were to look for cause? I checked sources of OpenOCD but could not find any clue as to where to look further. Log in attachment. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@J-Wrobel, first thank you for posting in Discussions. So many lazy people create a code Issue even though there is not a code issue. Alas, it is not viable to borrow instructions for a different project and expect the same results. You should not use the pico-debug instructions for DapperMime. pico-debug is special in that it will work with both authentic OpenOCD and raspberrypi/openocd. What you are trying to do was debug an entire RP2040 Pico chip, and at the moment, this is only possible with raspberrypi/openocd. The RP2040 Pico is unusual in that debugging the chip (by connecting to the SWD connector) depends on something called "SWD multi-drop". At the time of writing, the authentic OpenOCD still doesn't have all the functionality needed for this. It does work with pico-debug, which doesn't need "SWD multi-drop". pico-debug is different in that it runs on Core1 and debugs Core0; it makes Core0 look like the only CPU. What you were attempting was to connect to both Core0 and Core1, which needs "SWD multi-drop"... even if you are only debugging one core. For DapperMime, what I suggest is that you do is follow the instructions in "Appendix A: Using Picoprobe", but make the following substitutions. Here is the document: https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf Follow "Build OpenOCD", but instead of:
do:
Note that you MUST have source code from raspberrypi/openocd that is no older than 2021 Jun 18 since raspberrypi stalled on adopting my CMSIS-DAP patch until then. Or, if you don't want to build it yourself (particular if you are not using Linux), you can get pre-built binaries here: https://github.com/earlephilhower/pico-quick-toolchain/releases/ Then follow "Picoprobe Wiring". Then, skip "Install Picoprobe driver (only needed on Windows)", since DapperMime doesn't need drivers. Then, for "Using Picoprobe with OpenOCD", instead of:
do:
The OpenOCD output should look something like this:
So, the executive summary is that the only changes from the picoprobe instructions are: a) no special drivers needed
instead of:
You should be able to use any of the many instructions online that are written for picoprobe just with the replacements (b) and (c) above. |
Beta Was this translation helpful? Give feedback.
-
Thanks for quick reply. I figured it would be 'me' issue rather than 'code' issue :). You are right that it was quite naive for me to expect success not following exact instructions on topic that is fairly new to me. I guess I felt over-adventurous. I followed most of instructions from DapperMime but did build regular OpenOCD miss-understanding that lacking support for multi-drop would limit me to one core. I need to do some more reading on that but You are probably right that it actually prevents me to access any core at all. Thanks again for taking time to provide instructions and some insight on multi-drop. |
Beta Was this translation helpful? Give feedback.
@J-Wrobel, first thank you for posting in Discussions. So many lazy people create a code Issue even though there is not a code issue.
Alas, it is not viable to borrow instructions for a different project and expect the same results.
You should not use the pico-debug instructions for DapperMime.
pico-debug is special in that it will work with both authentic OpenOCD and raspberrypi/openocd.
What you are trying to do was debug an entire RP2040 Pico chip, and at the moment, this is only possible with raspberrypi/openocd.
The RP2040 Pico is unusual in that debugging the chip (by connecting to the SWD connector) depends on something called "SWD multi-drop". At the time of writing, the authentic…