Skip to content

Commit d162ca1

Browse files
Merge branch 'master' into ks2
2 parents 38bfbf4 + e0ff046 commit d162ca1

File tree

3 files changed

+6
-32
lines changed

3 files changed

+6
-32
lines changed

cores/rp2040/RP2040USB.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,6 @@ usbd_class_driver_t const *usbd_app_driver_get_cb(uint8_t *driver_count) {
566566

567567
#elif defined NO_USB
568568

569-
// will ensure backward compatibility with existing code when using pico-debug
570-
571569
#warning "NO_USB selected. No output to Serial will occur!"
572570

573571
#include <Arduino.h>

docs/install.rst

+6-10
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,9 @@ The first line creates a file with the USB vendor and ID of the Picoprobe and te
184184

185185
Once Picoprobe permissions are set up properly, then select the board "Raspberry Pi Pico (Picoprobe)" in the Tools menu and upload as normal.
186186

187-
Uploading Sketches with pico-debug
188-
----------------------------------
189-
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.
190-
191-
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.
187+
Uploading Sketches with OpenOCD
188+
-------------------------------
189+
Under Windows and macOS, any user should be able to access OpenOCD automatically, but under Linux `udev` must be told about the device and to allow normal users access.
192190

193191
To set up user-level access to all CMSIS-DAP adapters on Ubuntu (and other OSes which use `udev`):
194192

@@ -199,10 +197,8 @@ To set up user-level access to all CMSIS-DAP adapters on Ubuntu (and other OSes
199197
200198
The first line creates a file that recognizes all CMSIS-DAP adapters and tells UDEV to give users full access to it. The second causes `udev` to load this new rule. Note that you will need to unplug and re-plug in your device the first time you create this file, to allow udev to make the device node properly.
201199

202-
Once CMSIS-DAP permissions are set up properly, then select the board "Raspberry Pi Pico (pico-debug)" in the Tools menu.
203-
204-
When first connecting the USB port to your PC, you must copy pico-debug-gimmecache.uf2 to the Pi Pico to load pico-debug into RAM; after this, upload as normal.
200+
Once CMSIS-DAP permissions are set up properly, then select the Upload Method "Picoprobe/Debugprobe (CMSIS-DAP)" in the Tools menu.
205201

206-
Debugging with Picoprobe/pico-debug, OpenOCD, and GDB
202+
Debugging with Picoprobe/Debugprobe, OpenOCD, and GDB
207203
-----------------------------------------------------
208-
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, 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".
204+
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.

docs/platformio.rst

-20
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ To specify the debugging adapter, use ``debug_tool`` (`documentation <https://do
342342
* ``jlink``
343343
* ``raspberrypi-swd``
344344
* ``blackmagic``
345-
* ``pico-debug``
346345

347346
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.
348347

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

363362
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>`__.
364363

365-
.. note::
366-
For the pico-debug (`download <https://github.com/majbthrd/pico-debug/releases>`__) debugging way, *which needs 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-
384364
Filesystem Uploading
385365
--------------------
386366

0 commit comments

Comments
 (0)