Custom

Configuration:

debug_tool = custom

PIO Unified Debugger can be configured from “platformio.ini” (Project Configuration File):

Examples

Black Magic Probe

Black Magic Probe with a custom debug_port (list ports with platformio device list)

[env:debug]
platform = ...
board = ...
framework = ...
debug_tool = custom
; set here a valid port...
debug_port = /dev/cu.usbmodem7BB07991
debug_init_cmds =
  target extended-remote $DEBUG_PORT
  monitor swdp_scan
  attach 1
  set mem inaccessible-by-default off
  $INIT_BREAK
  $LOAD_CMDS

pyOCD and CMSIS-DAP

Using pyOCD for CMSIS-DAP based boards

Firstly, please install pyOCD and check that pyocd-gdbserver --version command works.

[env:debug]
platform = ...
board = ...
framework = mbed
debug_tool = custom
debug_server = pyocd-gdbserver