I have a Raspberry Pi Pico connected to a Picoprobe. I’m running pico-setup-windows, v1.5.1. This works fine for debugging CMakeLists.txt
projects. It used to work for PlatformIO, too, but something broke when I applied some updates (I guess).
If I try to run “PIO Debug”, I get this:
DEBUG CONSOLE shows:
Reading symbols from C:\Users\carlk\pi\pico\work\no-OS-FatFS-SD-SDIO-SPI-RPi-Pico\examples\PlatformIO\data_logger\.pio\build\pico\firmware.elf...
Warning: 'set target-async', an alias for the command 'set mi-async', is deprecated.
Use 'set mi-async'.
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = picoprobe
PlatformIO: Initializing remote target...
Open On-Chip Debugger 0.12.0-g4d87f6dca (2023-08-24-20:49)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
embedded:startup.tcl:28: Error: Can't find interface/picoprobe.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 28
.pioinit:13: Error in sourced command file:
Remote communication error. Target disconnected.: No error.
I can’t seem to find a file called interface/picoprobe.cfg
or even one called startup.tcl
.
Here is launch.json
:
// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
//
// PIO Unified Debugger
//
// Documentation: https://docs.platformio.org/page/plus/debugging.html
// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html
{
"version": "0.2.0",
"configurations": [
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug",
"executable": "C:/Users/carlk/pi/pico/work/no-OS-FatFS-SD-SDIO-SPI-RPi-Pico/examples/PlatformIO/data_logger/.pio/build/pico/firmware.elf",
"projectEnvName": "pico",
"toolchainBinDir": "C:/Users/carlk/.platformio/packages/toolchain-rp2040-earlephilhower/bin",
"internalConsoleOptions": "openOnSessionStart",
"svdPath": "C:/Users/carlk/.platformio/platforms/raspberrypi@src-ff76a3915224135aafad379817f41edd/misc/svd/rp2040.svd",
"preLaunchTask": {
"type": "PlatformIO",
"task": "Pre-Debug"
}
},
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (skip Pre-Debug)",
"executable": "C:/Users/carlk/pi/pico/work/no-OS-FatFS-SD-SDIO-SPI-RPi-Pico/examples/PlatformIO/data_logger/.pio/build/pico/firmware.elf",
"projectEnvName": "pico",
"toolchainBinDir": "C:/Users/carlk/.platformio/packages/toolchain-rp2040-earlephilhower/bin",
"internalConsoleOptions": "openOnSessionStart",
"svdPath": "C:/Users/carlk/.platformio/platforms/raspberrypi@src-ff76a3915224135aafad379817f41edd/misc/svd/rp2040.svd"
},
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (without uploading)",
"executable": "C:/Users/carlk/pi/pico/work/no-OS-FatFS-SD-SDIO-SPI-RPi-Pico/examples/PlatformIO/data_logger/.pio/build/pico/firmware.elf",
"projectEnvName": "pico",
"toolchainBinDir": "C:/Users/carlk/.platformio/packages/toolchain-rp2040-earlephilhower/bin",
"internalConsoleOptions": "openOnSessionStart",
"svdPath": "C:/Users/carlk/.platformio/platforms/raspberrypi@src-ff76a3915224135aafad379817f41edd/misc/svd/rp2040.svd",
"loadMode": "manual"
}
]
}
and platform.ini
:
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:pico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
debug_tool = picoprobe
upload_protocol = picoprobe
monitor_port = COM8
monitor_speed = 115200
build_flags =
"-Wno-psabi"
-D USE_DBG_PRINTF ; Debug output
; Normal way:
; lib_deps =
; carlk3/no-OS-FatFS-SD-SPI-RPi-Pico@^1.0.2
; Get the latest straight from github:
; lib_deps = https://github.com/carlk3/no-OS-FatFS-SD-SDIO-SPI-RPi-Pico.git
; Use local copy:
lib_deps = no-OS-FatFS-SD-SDIO-SPI-RPi-Pico
lib_extra_dirs = ../../../..