Comments (6)
Update 1:
I did what the console told me.
IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here.
Now the therminal output looks like this:
[2022-09-09T12:39:07.939Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "D:\\Projects\\pico\\pico-examples" -f "c:/Users/***/.vscode/extensions/marus25.cortex-debug-1.6.3/support/openocd-helpers.tcl" -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg
Open On-Chip Debugger 0.11.0-g228ede4 (2022-09-09-01:28)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
embedded:startup.tcl:26: Error: Can't find interface/raspberrypi-swd.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 26
[2022-09-09T12:39:07.992Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
embedded:startup.tcl:26: Error: Can't find interface/raspberrypi-swd.cfg in procedure 'script' at file "embedded:startup.tcl", line 26
Hmmm.... I've got a raspberrypi-swd.cfg
at D:\Projects\pico\openocd\tcl\interface
... how may I tell GDP (or openocd?) that?
from openocd.
Update 2:
I changed the configFiles
in the launch.json
from
"configFiles": [
"interface/raspberrypi-swd.cfg",
"target/rp2040.cfg"
],
to
"configFiles": [
"D:\\Projects\\pico\\openocd\\tcl\\interface\\raspberrypi-swd.cfg",
"D:\\Projects\\pico\\openocd\\tcl\\target\\rp2040.cfg"
],
Altough this feels like something wrong to do since this file is from pico-examples
GIT, it seems like I'm one step further now.
Now I'm getting this error:
[2022-09-09T13:12:22.913Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "D:\\Projects\\pico\\pico-examples" -f "c:/Users/***/.vscode/extensions/marus25.cortex-debug-1.6.3/support/openocd-helpers.tcl" -f "D:\\Projects\\pico\\openocd\\tcl\\interface\\raspberrypi-swd.cfg" -f "D:\\Projects\\pico\\openocd\\tcl\\target\\rp2040.cfg"
Open On-Chip Debugger 0.11.0-g228ede4 (2022-09-09-01:28)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
Error: The specified debug interface was not found (bcm2835gpio)
The following debug adapters are available:
1: ftdi
2: usb_blaster
3: ft232r
4: jlink
5: vsllink
6: ulink
7: hla
8: osbdm
9: opendous
10: aice
11: picoprobe
12: cmsis-dap
13: xds110
14: st-link
[2022-09-09T13:12:22.956Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
Trying to delete openocd
, clone it again and configure with parameter --enable-bcm2835gpio
, altough getting-started-with-pico
doesn't say anything about that parameter...
from openocd.
After lot's of struggeling I almost think I'm the only person who tries to DEBUG an Pico on Windows
I can assure you that we did lots of testing of the instructions in the documentation, including the debugging steps, on Windows, Mac and Linux, before the release of the RP2040. But it's possible that some of the external software in the instructions has changed in the meantime, and we've not had time to revisit the instructions and update them as necessary.
EDIT: A colleague also tells me that he tested the instructions on Windows 11 prior to the release of Pico W.
also I would have some feedback to the getting-started-with-pico guideline, where would be the correct place to share it?
At https://github.com/raspberrypi/pico-feedback please.
"interface/raspberrypi-swd.cfg"
That's only for if you're debugging a Pico using the GPIO pins on a Raspberry Pi (e.g. like in Chapter 5 of the Getting-Started guide), and this is also why you're getting an error about bcm2835gpio. If you're using one Pico to debug another Pico, then I suspect you need to use interface/picoprobe.cfg
instead, as shown on page 64 of the same PDF.
In general, for these types of installation questions, you're likely to get more help by asking at https://forums.raspberrypi.com/viewforum.php?f=143
from openocd.
Trying to delete openocd, clone it again and configure with parameter --enable-bcm2835gpio, altough getting-started-with-pico doesn't say anything about that parameter...
Failed. Hung up at the libusb is required
error again I solved yesterday somehow while building openocd.
If you're using one Pico to debug another Pico, then I suspect you need to use interface/picoprobe.cfg instead
Okay, makes sense somehow. Backuped my yesterday built openocd, changed the referenced CFG, now i got:
[2022-09-09T15:03:02.162Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "D:\\Projects\\pico\\pico-examples" -f "c:/Users/***/.vscode/extensions/marus25.cortex-debug-1.6.3/support/openocd-helpers.tcl" -f "D:\\Projects\\pico\\openocd\\tcl\\interface\\picoprobe.cfg" -f "D:\\Projects\\pico\\openocd\\tcl\\target\\rp2040.cfg"
Open On-Chip Debugger 0.11.0-g228ede4 (2022-09-09-01:28)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
Info : only one transport option; autoselect 'swd'
adapter speed: 5000 kHz
D:\Projects\pico\openocd\tcl\target\rp2040.cfg:1: Error: Can't find target/swj-dp.tcl
in procedure 'script'
at file "embedded:startup.tcl", line 26
at file "D:\Projects\pico\openocd\tcl\target\rp2040.cfg", line 1
[2022-09-09T15:03:02.219Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
All those relative paths are misleading, what am I missing?
There is a D:\Projects\pico\openocd\tcl\target\swj-dp.tcl
, why doesn't it find it?
At https://github.com/raspberrypi/pico-feedback please.
All right, thanks, I will post something there once I've got it running maybe someday...
In general, for these types of installation questions, you're likely to get more help by asking at https://forums.raspberrypi.com/viewforum.php?f=143
I already assumed so, but I've got no forums account (yet), so I thought I'll try here first.
btw...
as shown on page 64 of the same PDF
That's the description of terminal usage, isn't it? I didn't realize it must be changed for Visual Studio Code debugging usage, too.
EDIT:
If I turn back the launch.json
"configFiles"
to relative paths instead of absolute full paths it also cannot find the interface/picoprobe.cfg
in the first place.
from openocd.
Update:
Found https://forums.raspberrypi.com/viewtopic.php?t=301122.
Added "searchDir": [ "D:\\Projects\\pico\\openocd\\tcl" ]
to the launch.json
.
Seems like one step forward. Now I get:
[2022-09-09T15:28:28.194Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "D:\\Projects\\pico\\openocd\\tcl" -f "c:/Users/***/.vscode/extensions/marus25.cortex-debug-1.6.3/support/openocd-helpers.tcl" -f interface/picoprobe.cfg -f target/rp2040.cfg
Open On-Chip Debugger 0.11.0-g228ede4 (2022-09-09-01:28)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
Info : only one transport option; autoselect 'swd'
adapter speed: 5000 kHz
Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Info : clock speed 5000 kHz
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x10000001
Info : rp2040.core0: hardware has 4 breakpoints, 2 watchpoints
Info : rp2040.core1: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 50000
Info : Listening on port 50000 for gdb connections
[2022-09-09T15:28:29.253Z] SERVER CONSOLE DEBUG: GDBServerConsole: onBackendConnect: gdb-server program client error Error: read ECONNRESET
[2022-09-09T15:28:29.254Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
hmmm....
btw. system looks like that:
from openocd.
In general, for these types of installation questions, you're likely to get more help by asking at https://forums.raspberrypi.com/viewforum.php?f=143
Done.
https://forums.raspberrypi.com/viewtopic.php?p=2036844
from openocd.
Related Issues (20)
- OpenOCD can't find the CMSIS-DAP device, but pyocd can. HOT 6
- Using a Pico W for a picoprobe not working HOT 16
- Any chance to update to openocd 0.12? HOT 6
- New install of OpenOCD and Msys2 - bootstrap and configure errors HOT 2
- Picoprobe with not working openOCD mac osx HOT 2
- Semihosting unusable due to excesive verbosity HOT 14
- Packaging raspberrypi/openocd on nixpkgs HOT 2
- Make errors out on -Werror HOT 8
- FRAM chip IDs incorrect HOT 2
- Cannot build on M1 macOS Sonoma HOT 3
- On Mac, through Visual Studio Code, OpenOcd exits immediately HOT 1
- Not able to flash the binary to picoW HOT 2
- OpenOCD + Picoprobe flashes extremely slowly HOT 1
- question about monitor reset init operation for raspberrypi pico HOT 2
- Not able to run Openocd for rp2040 on rpi5 HOT 18
- Raspberry Pi Debug Probe documentation needs clarification HOT 8
- In rp2040.cfg getting error "Unknown param: -dp-id" HOT 4
- Unable to build openocd HOT 1
- Unable to flash using openocd & gdb `load` HOT 2
- add flash definition for xiao rp2040 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openocd.