You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platformio.rst
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -342,6 +342,7 @@ To specify the debugging adapter, use ``debug_tool`` (`documentation <https://do
342
342
* ``jlink``
343
343
* ``raspberrypi-swd``
344
344
* ``blackmagic``
345
+
* ``pico-debug``
345
346
346
347
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.
347
348
@@ -361,6 +362,25 @@ For further information on customizing debug options, like the initial breakpoin
361
362
362
363
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>`__.
363
364
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
+
364
384
Filesystem Uploading
365
385
--------------------
366
386
@@ -375,3 +395,7 @@ The files you want to upload should be placed in a folder called ``data`` inside
375
395
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.
376
396
377
397
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
0 commit comments