I recently got myself an mplab snap since it was reasonably priced and claimed AVR JTAG support.
I'm trying to get the snap ro connect to an m644. After several attempts and not an insignificant amount of guesswork, I've finally got it to atleast compile blinky with avr8 (dont really want to go down the XC8 rabbit hole), verify target voltage and read the chip signature correctly and attempt to write via MPLAB X. I know the complied itself works fine because I sent the generated hex over with a bootloader. Oh, yeah, the part is programmed with a bootloader with the appropriate fuse and lock bits set for a 2k boot size, If that makes a difference.
The JTAG lines, matched by name, are routed directly to the corresponding pins on the SNAP 8 pin connector. There are no external pull ups, series resistors, capacitors, or diodes anywhere near these lines save for a 10k pullup on the reset line.
I haven't used JTAG with AVRs before, though I have used AVRs a fair bit since '06 otherwise and JTAG with MSP430s through gdb and crossworks at different times and a launchpad and ATSAM7 through a segger Jlink and IAR. I haven't used MPLAB (or AVR studio, for that matter) before.
When it comes time to write, however, it dumps out with an "invalid physical state" error, I think with (49), but I'm not near the hardware right now to confirm. I can't seem to find any mention of such an error anywhere. Microchip documentation is horrible, and quite frankly is at the opposite end of the spectrum from what I've come to expect from Atmel.
I've pretty much run out of places to look. Any help or insight would be much appreciated.