Using BlackMagic Probe SWD with SAMD21

I posted this on the back of another recent post to find out their .ini settings - but probably its better as a separate post … I’m wondering if anybody has an insights. Thanks

I’m trying to connect the BlackMagic probe to a SAMD21J18A Autonomo/Sodaq over SWD (not JTAG). I don’t seem to have any luck in getting the basics connecting even the first time.
the .platformio\packages\framework-arduinosam\variants\sodaq_autonomo\debug_scripts\variant.gdb

target remote | openocd -c “interface cmsis-dap” -c “set CHIPNAME at91samd21j18” -f target/at91samdXX.cfg -c “gdb_port pipe; log_output openocd.log”

but I don’t seem to have openocd on my path - or at least typing into a terminal it doesn’t come up. (PlatformIO, version 3.6.4)

On Win10 the BlackMagic is configuring as COM8 and COM9. This is what I’m using in platformio.ini

board = sodaq_autonomo
platform = atmelsam
debug_tool = blackmagic
debug_port = COM8
framework = arduino

and terminal output is showing …

Linking .pioenvs\sodaq_autonomo\firmware.elf
Checking size .pioenvs\sodaq_autonomo\firmware.elf
Building .pioenvs\sodaq_autonomo\firmware.bin
Memory Usage ->
DATA:    [==        ]  21.6% (used 7088 bytes from 32768 bytes)
PROGRAM: [====      ]  35.3% (used 92408 bytes from 262144 bytes)
Configuring upload protocol...
AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
CURRENT: upload_protocol = sam-ba
Looking for upload port...
Auto-detected: COM9
Forcing reset using 1200bps open/close on port COM9
Waiting for the new upload port...
Uploading .pioenvs\sodaq_autonomo\firmware.bin
No device found on COM9

I needed
upload_protocol = blackmagic
thanks to the other post I found it.