PiPico-VsCode-GDB file not found

OP #7884971
Lesenswert?

Hallo, ich brauch einen Tipp. Ich hab mal wieder in VsCode mit Picoprojekt ein neues Projekt gestartet. Leider wird diesmal das file "raspberry-swd.cfg" nicht gefunden, obwohl es vorhanden ist. Compilieren geht und über Boot mit uf2 läuft es auch. Nur zum debuggen über Vscode über GDB kommt es nicht.

1
Cortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: https://github.com/Marus/cortex-debug#usage
2
"configuration": {
3
    "name": "Pico Debug (Cortex-Debug)",
4
    "cwd": "C:\\Users\\RS/.pico-sdk/openocd/0.12.0+dev/scripts",
5
    "executable": "c:/Rudis/Rubelroller/Electronik/Schweisstrafo/Sps2/build/Sps2.elf",
6
    "request": "launch",
7
    "type": "cortex-debug",
8
    "servertype": "openocd",
9
    "serverpath": "C:\\Users\\RS/.pico-sdk/openocd/0.12.0+dev/openocd.exe",
10
    "gdbPath": "C:\\Users\\RS\\.pico-sdk\\toolchain\\14_2_Rel1\\bin\\arm-none-eabi-gdb",
11
    "device": "RP2040",
12
    "configFiles": [
13
        "raspberrypi-swd.cfg",
14
        "target/rp2040.cfg"
15
    ],
16
    "svdFile": "C:\\Users\\RS/.pico-sdk/sdk/2.1.1/src/rp2040/hardware_regs/RP2040.svd",
17
    "runToEntryPoint": "main",
18
    "overrideLaunchCommands": [
19
        "monitor reset init",
20
        "load \"c:/Rudis/Rubelroller/Electronik/Schweisstrafo/Sps2/build/Sps2.elf\""
21
    ],
22
    "openOCDLaunchCommands": [
23
        "adapter speed 5000"
24
    ],
25
    "showDevDebugOutput": "raw",
26
    "__configurationTarget": 6,
27
    "gdbServerConsolePort": 55878,
28
    "pvtAvoidPorts": [],
29
    "chainedConfigurations": {
30
        "enabled": false
31
    },
32
    "debuggerArgs": [],
33
    "swoConfig": {
34
        "enabled": false,
35
        "decoders": [],
36
        "cpuFrequency": 0,
37
        "swoFrequency": 0,
38
        "source": "probe"
39
    },
40
    "rttConfig": {
41
        "enabled": false,
42
        "decoders": []
43
    },
44
    "graphConfig": [],
45
    "preLaunchCommands": [],
46
    "postLaunchCommands": [],
47
    "preAttachCommands": [],
48
    "postAttachCommands": [],
49
    "preRestartCommands": [],
50
    "postRestartCommands": [],
51
    "preResetCommands": [],
52
    "postResetCommands": [],
53
    "searchDir": [],
54
    "toolchainPrefix": "arm-none-eabi",
55
    "extensionPath": "c:/Users/RS/.vscode/extensions/marus25.cortex-debug-1.12.1",
56
    "registerUseNaturalFormat": true,
57
    "variableUseNaturalFormat": true,
58
    "pvtVersion": "1.12.1",
59
    "__sessionId": "377da438-4513-472d-a8bf-b65d1f4ebec4",
60
    "pvtShowDevDebugOutput": "raw"
61
}
62
Reading symbols from c:/users/rs/.pico-sdk/toolchain/14_2_rel1/bin/arm-none-eabi-objdump --syms -C -h -w c:/Rudis/Rubelroller/Electronik/Schweisstrafo/Sps2/build/Sps2.elf
63
Reading symbols from c:/users/rs/.pico-sdk/toolchain/14_2_rel1/bin/arm-none-eabi-nm --defined-only -S -l -C -p c:/Rudis/Rubelroller/Electronik/Schweisstrafo/Sps2/build/Sps2.elf
64
Launching GDB: "C:\\Users\\RS\\.pico-sdk\\toolchain\\14_2_Rel1\\bin\\arm-none-eabi-gdb" -q --interpreter=mi2
65
1-gdb-version
66
Launching gdb-server: "C:\\Users\\RS/.pico-sdk/openocd/0.12.0+dev/openocd.exe" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "C:\\Users\\RS/.pico-sdk/openocd/0.12.0+dev/scripts" -f "c:/Users/RS/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f raspberrypi-swd.cfg -f target/rp2040.cfg -c "adapter speed 5000"
67
    Please check TERMINAL tab (gdb-server) for output from C:\Users\RS/.pico-sdk/openocd/0.12.0+dev/openocd.exe
68
Finished reading symbols from objdump: Time: 31 ms
69
-> =thread-group-added,id="i1"
70
-> ~"GNU gdb (Arm GNU Toolchain 14.2.Rel1 (Build arm-14.52)) 15.2.90.20241130-git\n"
71
-> ~"Copyright (C) 2024 Free Software Foundation, Inc.\n"
72
-> ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
73
-> ~"\nType \"show copying\" and \"show warranty\" for details.\n"
74
-> ~"This GDB was configured as \"--host=i686-w64-mingw32 --target=arm-none-eabi\".\n"
75
-> ~"Type \"show configuration\" for configuration details.\n"
76
-> ~"For bug reporting instructions, please see:\n"
77
-> ~"<https://bugs.linaro.org/>.\n"
78
-> ~"Find the GDB manual and other documentation resources online at:\n    <"
79
-> ~"http://www.gnu.org/software/gdb/documentation/>.\n\n"
80
-> ~"For help, type \"help\".\n"
81
-> ~"Type \"apropos word\" to search for commands related to \"word\".\n"
82
-> 1^done
83
2-gdb-set mi-async on
84
Finished reading symbols from nm: Time: 41 ms
85
OpenOCD: GDB Server Quit Unexpectedly. See gdb-server output in TERMINAL tab for more details.
86

87

88
"C:\\Users\\RS/.pico-sdk/openocd/0.12.0+dev/openocd.exe" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "C:\\Users\\RS/.pico-sdk/openocd/0.12.0+dev/scripts" -f "c:/Users/RS/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f raspberrypi-swd.cfg -f target/rp2040.cfg -c "adapter speed 5000"
89
Open On-Chip Debugger 0.12.0+dev-gebec950-dirty (2024-09-27-16:29)
90
Licensed under GNU GPL v2
91
For bug reports, read
92
        http://openocd.org/doc/doxygen/bugs.html
93
CDLiveWatchSetup
94
embedded:startup.tcl:28: Error: Can't find raspberrypi-swd.cfg in procedure 'script' at file "embedded:startup.tcl", line 28
OP #7885334
Lesenswert?

Nun hab ich einen absoluten Pfad angegeben:

1
"configFiles": [
2
                "C:/Rudis/Rubelroller/Electronik/Schweisstrafo/Sps2/raspberrypi-swd.cfg",
3
                "target/${command:raspberry-pi-pico.getTarget}.cfg"
4
            ],

Leider kommt nun der nächste Fehler:

1
"C:\\Users\\RS/.pico-sdk/openocd/0.12.0+dev/openocd.exe" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "C:\\Users\\RS/.pico-sdk/openocd/0.12.0+dev/scripts" -f "c:/Users/RS/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f "C:/Rudis/Rubelroller/Electronik/Schweisstrafo/Sps2/raspberrypi-swd.cfg" -f target/rp2040.cfg -c "adapter speed 5000"
2
Open On-Chip Debugger 0.12.0+dev-gebec950-dirty (2024-09-27-16:29)
3
Licensed under GNU GPL v2
4
For bug reports, read
5
        http://openocd.org/doc/doxygen/bugs.html
6
CDLiveWatchSetup
7
Error: The specified debug interface was not found (linuxgpiod)
8
The following debug adapters are available:
9
1: ftdi
10
2: usb_blaster
11
3: esp_usb_jtag
12
4: ft232r
13
5: usbprog
14
6: vsllink
15
7: rlink
16
8: ulink
17
9: angie
18
10: arm-jtag-ew
19
11: hla
20
12: osbdm
21
13: opendous
22
14: cmsis-dap
23
15: kitprog
24
16: xds110
25
17: st-link
26
[2025-06-02T08:51:13.257Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
27
GDB server session ended. This terminal will be reused, waiting for next session to start...

In meinen bisherigen Projekten war auch "linuxgpiod" im .cfg eingetragen. Gibt es diesen Adapter nicht mehr, oder ist er umbenamt. Ausprobiert hab ich mal die Nr. 10 und 14, war aber nicht ok.

OP #7885830
Lesenswert?

Hallo, mein Projekt ist eigentlich nicht sehr groß. Da kann ich auf Debugging verzichten und mache es auf Hacker-Art. Da es auf Timing ankommt muß ich eh vieles oszillografieren.

So geht es wahrscheinlich schneller, als dass ich noch >3 Tage suchen muß. Bis zum nächsten Projekt gibt es bestimmt noch einen Sack voller Updates zum Thema.

Naja, wenigstens war es mal ein Threat ohne Troll-Kommentare. Gruß Rudi

OP #7886190
Lesenswert?

Hallo, nun hab ich es doch gefunden. Ich hab ChatGPT einfach gefragt: "Debugging mit einem zweiten Pico und debugprobe_on_pico.uf2 auf Win11". Und das sollte ich ändern:

1
            "configFiles": [
2
                //raspberrypi-swd.cfg",       (falsch)
3
                "interface/cmsis-dap.cfg",    (richtig)
4
                "target/${command:raspberry-pi-pico.getTarget}.cfg"
5
            ],

War das für euch zu einfach? Und stand ich nur auf dem Schlauch? Bleibt für mich die Frage, ob es besser ist gleich ChatGPT zu fragen, da bekommt man auf jeden Fall eine Antwort. Ihr habt dann ja immer noch eueren small talk.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren