System: running a RPi5 over VNC programming a pico W over a debugprobe. Using the debugprobe from the command line, I am able to successfully program and run the blink program.
I set up VSCode using the standard instructions and am able to run the program. However, debugging using the launch configuration named "Pico Debug (Cortex-Debug)", I get an error on the openocd window:
Here is the invocation copied from the gdb-server terminal screen:
The file raspberrypi-swd.cfg is actually in the same directory as blink.c, one level above build/blink.elf. I believe that I properly generated the Cmake and make for a debug, not release version.
Why is openocd being asked to call "script" and "embedded:startup.tcl"? Where are these files, and why can't they find "raspberrypi-swd.cfg" which is right there with blink.c?
Thank you.
Code:
sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" -c "program blink.elf verify reset exit"
- embedded:startup.tcl:28: Error: Can't find raspberrypi-swd.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 28
Code:
"configurations": [ { "name": "Pico Debug (Cortex-Debug)", "cwd": "${userHome}/.pico-sdk/openocd/0.12.0+dev/scripts", "executable": "${command:raspberry-pi-pico.launchTargetPath}", "request": "launch", "type": "cortex-debug", "servertype": "openocd", "serverpath": "${userHome}/.pico-sdk/openocd/0.12.0+dev/openocd.exe", "gdbPath": "${command:raspberry-pi-pico.getGDBPath}", "device": "${command:raspberry-pi-pico.getChip}", "configFiles": [ "raspberrypi-swd.cfg", // PB try absolute address instead ... Nope"/home/paulbjork/pico/vscode-projects/blink/raspberrypi-swd.cfg", // PB maybe try cmsis instead ... Nope"interface/cmsis-dap.cfg", "target/${command:raspberry-pi-pico.getTarget}.cfg" ], "svdFile": "${userHome}/.pico-sdk/sdk/2.0.0/src/${command:raspberry-pi-pico.getChip}/hardware_regs/${command:raspberry-pi-pico.getChip}.svd", "runToEntryPoint": "main", // Fix for no_flash binaries, where monitor reset halt doesn't do what is expected // Also works fine for flash binaries "overrideLaunchCommands": [ "monitor reset init", "load \"${command:raspberry-pi-pico.launchTargetPath}\"" ], "openOCDLaunchCommands": [ "adapter speed 5000" ], // PB to see verbose GDB transactions here. Very helpful to debug issues or report problems "showDevDebugOutput": "raw" },
Code:
/home/paulbjork/.pico-sdk/openocd/0.12.0+dev/openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /home/paulbjork/.pico-sdk/openocd/0.12.0+dev/scripts -f /home/paulbjork/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f raspberrypi-swd.cfg -f target/rp2040.cfg -c "adapter speed 5000"
Why is openocd being asked to call "script" and "embedded:startup.tcl"? Where are these files, and why can't they find "raspberrypi-swd.cfg" which is right there with blink.c?
Thank you.
Statistics: Posted by paulbjork — Fri Sep 06, 2024 5:47 pm — Replies 0 — Views 25