Unable to program ATSAML21 PCB via SWD - Problem with connection?
As it turns out, on the 32 pin variant of the SAML21, you have to tie VDDANA to the power supply as well (with a decoupling cap in place obvs).

Got around it by soldering a bit of wire from the VDDANA pin to an exposed power pin on the first batch of boards. Got it rectified properly on the second set.

Note to self: read the datasheet properly next time!