Code Monkey home page Code Monkey logo

Comments (6)

Michel-0 avatar Michel-0 commented on July 17, 2024

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.

Michel-0 avatar Michel-0 commented on July 17, 2024

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.

lurch avatar lurch commented on July 17, 2024

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.

Michel-0 avatar Michel-0 commented on July 17, 2024

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.

Michel-0 avatar Michel-0 commented on July 17, 2024

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:
Unbenannt3

from openocd.

Michel-0 avatar Michel-0 commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.