Skip to content

Commit e95248a

Browse files
authored
Support and Document pico-debug in PlatformIO (earlephilhower#1427)
1 parent 414ff23 commit e95248a

File tree

63 files changed

+156
-120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+156
-120
lines changed

docs/platformio.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ To specify the debugging adapter, use ``debug_tool`` (`documentation <https://do
342342
* ``jlink``
343343
* ``raspberrypi-swd``
344344
* ``blackmagic``
345+
* ``pico-debug``
345346

346347
These values can also be used in ``upload_protocol`` if you want PlatformIO to upload the regular firmware through this method, which you likely want.
347348

@@ -361,6 +362,25 @@ For further information on customizing debug options, like the initial breakpoin
361362

362363
You can obtain precompiled binaries from `here <https://github.com/blackmagic-debug/blackmagic/issues/1364#issuecomment-1503372723>`__. A flashing guide is available `here <https://primalcortex.wordpress.com/2017/06/13/building-a-black-magic-debug-probe/>`__. You then have to configure the target serial port ("GDB port") in your project per `documentation <https://docs.platformio.org/en/latest/plus/debug-tools/blackmagic.html#debugging-tool-blackmagic>`__.
363364

365+
.. note::
366+
For the pico-debug (`download <https://github.com/majbthrd/pico-debug/releases>`__) debugging way, *which needs to no additional debug probe*, add this snippet to your ``platformio.ini`` and follow the given procedure:
367+
368+
.. code:: ini
369+
370+
upload_protocol = pico-debug
371+
debug_tool = pico-debug
372+
build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
373+
374+
1. Build your firmware normally
375+
2. Plug in the Pico in BOOTSEL mode
376+
3. Drag and drop your ``.pio/build/<env>/firmware.uf2`` onto the boot drive
377+
4. Unplug and replug your Pico back into BOOTSEL mode for the second time
378+
5. Drag and drop the downloaded ``pico-debug-gimmecache.uf2`` file onto the boot drive
379+
6. A CMSIS-DAP device should now appear on your computer
380+
7. Start debugging via the debug sidebar as normal
381+
382+
Note the restrictions: The second core cannot be used, the USB port cannot be used (no USB serial, only UART serial), 16KB less RAM is available.
383+
364384
Filesystem Uploading
365385
--------------------
366386

@@ -375,3 +395,7 @@ The files you want to upload should be placed in a folder called ``data`` inside
375395
The task "Build Filesystem Image" will take all files in the data directory and create a ``littlefs.bin`` file from it using the ``mklittlefs`` tool.
376396

377397
The task "Upload Filesystem Image" will upload the filesystem image to the Pico via the specified ``upload_protocol``.
398+
399+
.. note::
400+
Set the space available for the filesystem in the ``platformio.ini`` using e.g., ``board_build.filesystem_size = 0.5m``, or filesystem
401+
creation will fail!

tools/json/0xcb_helios.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_feather.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_feather_can.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_feather_dvi.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_feather_prop_maker.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_feather_rfm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_feather_scorpio.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_feather_thinkink.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_feather_usb_host.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_itsybitsy.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_kb2040.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_macropad2040.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_qtpy.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_stemmafriend.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/adafruit_trinkeyrp2040qt.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/arduino_nano_connect.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/bridgetek_idm2040-7a.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_2040_lora.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_2040_lte.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_2040_nfc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_2040_sdrtc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_2040_subghz.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_2040_uwb.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_2040_wifi.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_2040_wifi_ble.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/challenger_nb_2040_wifi.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/cytron_maker_nano_rp2040.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/cytron_maker_pi_rp2040.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/datanoisetv_picoadk.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/dfrobot_beetle_rp2040.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"jlink",
4848
"raspberrypi-swd",
4949
"picotool",
50-
"picoprobe"
50+
"picoprobe",
51+
"pico-debug"
5152
]
5253
},
5354
"url": "https://www.raspberrypi.org/products/raspberry-pi-pico/",

tools/json/electroniccats_bombercat.json

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)