Remove pico-debug because it's archived (#2392)

Pico-Debug is no longer supported and was removed from OpenOCD, so remove
the references and upload menu items for it.

Fixes https://github.com/earlephilhower/pico-quick-toolchain/issues/61
This commit is contained in:
Earle F. Philhower, III 2024-08-30 14:16:50 -07:00 committed by GitHub
parent 42a0c88174
commit 729163d0cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 7 additions and 693 deletions

View file

@ -102,7 +102,6 @@ Read the [Contributing Guide](https://github.com/earlephilhower/arduino-pico/blo
* Generic RP2350 (configurable flash, I/O pins)
# Features
* Transparent use of PSRAM globals and heap (RP2350 only)
* Adafruit TinyUSB Arduino (USB mouse, keyboard, flash drive, generic HID, CDC Serial, MIDI, WebUSB, others)
* Bluetooth on the PicoW (Classic and BLE) with Keyboard, Mouse, Joystick, and Virtual Serial
* Bluetooth Classic and BLE HID master mode (connect to BT keyboard, mouse, or joystick)
@ -123,6 +122,7 @@ Read the [Contributing Guide](https://github.com/earlephilhower/arduino-pico/blo
* USB drive mode for data loggers (SingleFileDrive, FatFSUSB)
* Peripherals: SPI master/slave, Wire(I2C) master/slave, dual UART, emulated EEPROM, I2S audio input/output, Servo
* printf (i.e. debug) output over USB serial
* Transparent use of PSRAM globals and heap (RP2350 only)
The RP2040 PIO state machines (SMs) are used to generate jitter-free:
* Servos
@ -195,11 +195,6 @@ cd ../tools
python3 ./get.py
`````
# Installing both Arduino and CMake
Tom's Hardware presented a very nice writeup on installing `arduino-pico` on both Windows and Linux, available at https://www.tomshardware.com/how-to/program-raspberry-pi-pico-with-arduino-ide
If you follow Les' step-by-step you will also have a fully functional `CMake`-based environment to build Pico apps on if you outgrow the Arduino ecosystem.
# Uploading Sketches
To upload your first sketch, you will need to hold the BOOTSEL button down while plugging in the Pico to your computer.
Then hit the upload button and the sketch should be transferred and start to run.
@ -220,9 +215,9 @@ To install, follow the directions in
* https://github.com/earlephilhower/arduino-pico-littlefs-plugin/blob/master/README.md
For detailed usage information, please check the ESP8266 repo documentation (ignore SPIFFS related notes) available at
* https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html
* https://arduino-pico.readthedocs.io/en/latest/fs.html
# Uploading Sketches with Picoprobe
# Uploading Sketches with Picoprobe/Debugprobe
If you have built a Raspberry Pi Picoprobe, you can use OpenOCD to handle your sketch uploads and for debugging with GDB.
Under Windows a local admin user should be able to access the Picoprobe port automatically, but under Linux `udev` must be told about the device and to allow normal users access.
@ -242,28 +237,8 @@ If for some reason the device file does not appear, manually unplug and re-plug
Once Picoprobe permissions are set up properly, then select the board "Raspberry Pi Pico (Picoprobe)" in the Tools menu and upload as normal.
# Uploading Sketches with pico-debug
[pico-debug](https://github.com/majbthrd/pico-debug/) differs from Picoprobe in that pico-debug is a virtual debug pod that runs side-by-side on the same RP2040 that you run your code on; so, you only need one RP2040 board instead of two. pico-debug also differs from Picoprobe in that pico-debug is standards-based; it uses the CMSIS-DAP protocol, which means even software not specially written for the Raspberry Pi Pico can support it. pico-debug uses OpenOCD to handle your sketch uploads, and debugging can be accomplished with CMSIS-DAP capable debuggers including GDB.
Under Windows and macOS, any user should be able to access pico-debug automatically, but under Linux `udev` must be told about the device and to allow normal users access.
To set up group-level access to all CMSIS-DAP adapters on Ubuntu (and other OSes which use `udev`):
````
echo 'ATTRS{product}=="*CMSIS-DAP*", MODE="664", GROUP="plugdev"' | sudo tee -a /etc/udev/rules.d/98-CMSIS-DAP.rules
sudo udevadm control --reload
sudo udevadm trigger -w -s usb
````
The first line creates a device file in `/dev` that matches all CMSIS-DAP adapters, and it enables read+write permissions for members of the `plugdev` group. The second line causes `udev` to load this new rule. The third line requests the kernel generate "device change" events that will cause our new `udev` rule to run.
If for some reason the device file does not appear, manually unplug and re-plug the USB connection and check again. The output from `dmesg` can reveal useful diagnostics if the device file remains absent.
Once CMSIS-DAP permissions are set up properly, then select the board "Raspberry Pi Pico (pico-debug)" in the Tools menu.
When first connecting the USB port to your PC, you must copy [pico-debug-gimmecache.uf2](https://github.com/majbthrd/pico-debug/releases/) to the Pi Pico to load pico-debug into RAM; after this, upload as normal.
# Debugging with Picoprobe/pico-debug, OpenOCD, and GDB
The installed tools include a version of OpenOCD (in the pqt-openocd directory) and GDB (in the pqt-gcc directory). These may be used to run GDB in an interactive window as documented in the Pico Getting Started manuals from the Raspberry Pi Foundation. For [pico-debug](https://github.com/majbthrd/pico-debug/), replace the raspberrypi-swd and picoprobe example OpenOCD arguments of "-f interface/raspberrypi-swd.cfg -f target/rp2040.cfg" or "-f interface/picoprobe.cfg -f target/rp2040.cfg" respectively in the Pico Getting Started manual with "-f board/pico-debug.cfg".
# Debugging with Picoprobe, OpenOCD, and GDB
The installed tools include a version of OpenOCD (in the pqt-openocd directory) and GDB (in the pqt-gcc directory). These may be used to run GDB in an interactive window as documented in the Pico Getting Started manuals from the Raspberry Pi Foundation. Use the command line `./system/openocd/bin/openocd -f ./lib/rp2040/picoprobe_cmsis_dap.tcl` or `./system/openocd/bin/openocd -f ./lib/rp2350/picoprobe_cmsis_dap.tcl` from the `git` installation directory.
# Licensing and Credits
* The [Arduino IDE and ArduinoCore-API](https://arduino.cc) are developed and maintained by the Arduino team. The IDE is licensed under GPL.

File diff suppressed because it is too large Load diff

View file

@ -1 +0,0 @@
source [find board/pico-debug.cfg]

View file

@ -115,8 +115,6 @@ sed 's/^tools.picoprobe_cmsis_dap.cmd=.*//g' | \
sed 's/^#tools.picoprobe_cmsis_dap.cmd=/tools.picoprobe_cmsis_dap.cmd=/g' | \
sed 's/^tools.picotool.cmd=.*//g' | \
sed 's/^#tools.picotool.cmd=/tools.picotool.cmd=/g' | \
sed 's/^tools.picodebug.cmd=.*//g' | \
sed 's/^#tools.picodebug.cmd=/tools.picodebug.cmd=/g' | \
sed 's/^discovery.rp2040.pattern=.*//g' | \
sed 's/^#discovery.rp2040.pattern=/discovery.rp2040.pattern=/g' | \
sed 's/^pluggable_discovery.rp2040.pattern=.*//g' | \

View file

@ -213,10 +213,3 @@ tools.picoprobe_cmsis_dap.upload.protocol=picoprobe_cmsis_dap
tools.picoprobe_cmsis_dap.upload.params.verbose=
tools.picoprobe_cmsis_dap.upload.params.quiet=
tools.picoprobe_cmsis_dap.upload.pattern="{cmd}/bin/openocd" -f "interface/cmsis-dap.cfg" -f "target/{build.chip}.cfg" -s "{cmd}/share/openocd/scripts" -c "init; adapter speed 5000; program {{build.path}/{build.project_name}.elf} verify; reset; exit"
#tools.picodebug.cmd={runtime.tools.pqt-openocd.path}
tools.picodebug.cmd={runtime.platform.path}/system/openocd
tools.picodebug.upload.protocol=pico-debug
tools.picodebug.upload.params.verbose=
tools.picodebug.upload.params.quiet=
tools.picodebug.upload.pattern="{cmd}/bin/openocd" -f "board/pico-debug.cfg" -s "{cmd}/share/openocd/scripts" -c "program {{build.path}/{build.project_name}.elf} verify reset exit"

View file

@ -157,17 +157,12 @@ def BuildIPBTStack(name):
def BuildUploadMethodMenu(name, ram):
for a, b, c, d, e, f in [ ["default", "Default (UF2)", ram, "picoprobe_cmsis_dap.tcl", "uf2conv", "uf2conv-network"],
["picotool", "Picotool", ram, "picoprobe.tcl", "picotool", None],
["picoprobe_cmsis_dap", "Picoprobe/Debugprobe (CMSIS-DAP)", ram, "picoprobe_cmsis_dap.tcl", "picoprobe_cmsis_dap", None],
["picodebug", "Pico-Debug", 240, "picodebug.tcl", "picodebug", None] ]:
if (ram > 256) and (a == "picodebug"):
continue
["picoprobe_cmsis_dap", "Picoprobe/Debugprobe (CMSIS-DAP)", ram, "picoprobe_cmsis_dap.tcl", "picoprobe_cmsis_dap", None] ]:
print("%s.menu.uploadmethod.%s=%s" % (name, a, b))
print("%s.menu.uploadmethod.%s.build.ram_length=%dk" % (name, a, c))
print("%s.menu.uploadmethod.%s.build.debugscript=%s" % (name, a, d))
# For pico-debug, need to disable USB unconditionally
if a == "picodebug":
print("%s.menu.uploadmethod.%s.build.picodebugflags=-UUSE_TINYUSB -DNO_USB -DDISABLE_USB_SERIAL -I{runtime.platform.path}/tools/libpico" % (name, a))
elif a == "picotool":
if a == "picotool":
print("%s.menu.uploadmethod.%s.build.picodebugflags=-DENABLE_PICOTOOL_USB" % (name, a))
print("%s.menu.uploadmethod.%s.upload.maximum_data_size=%d" % (name, a, c * 1024))
print("%s.menu.uploadmethod.%s.upload.tool=%s" % (name, a, e))

View file

@ -23,19 +23,6 @@ chip = board.get("build.mcu")
upload_protocol = env.subst("$UPLOAD_PROTOCOL") or "picotool"
ram_size = int(board.get("upload.maximum_ram_size"))
psram_len = int(board.get("upload.psram_length", "0"))
if chip == "rp2040":
#ram_size = board.get("upload.maximum_ram_size") # PlatformIO gives 264K here
# but the RAM size we need is without the SCRATCH memory.
if upload_protocol == "pico-debug":
ram_size = 240 * 1024 # pico-debug needs 16K of the upper memory for itself with pico-debug-gimmecache.uf2
# this only works when the user disables the USB stack.
if "PIO_FRAMEWORK_ARDUINO_NO_USB" not in env.Flatten(env.get("CPPDEFINES", [])):
sys.stderr.write("Must define PIO_FRAMEWORK_ARDUINO_NO_USB when using pico-debug!\n")
env.Exit(-1)
else:
ram_size = 256 * 1024 # not the 264K, which is 256K SRAM + 2*4K SCRATCH(X/Y).
# Update available RAM size
board.update("upload.maximum_ram_size", ram_size)
FRAMEWORK_DIR = platform.get_package_dir("framework-arduinopico")
assert os.path.isdir(FRAMEWORK_DIR)
@ -318,9 +305,6 @@ def configure_usb_flags(cpp_defines):
pidtouse = usb_pid
if upload_protocol == "picoprobe":
pidtouse = '0x0004'
elif upload_protocol == "pico-debug":
vidtouse = '0x1209'
pidtouse = '0x2488'
env.Append(CPPDEFINES=[
("CFG_TUSB_MCU", "OPT_MCU_RP2040"),