I am using a PICKit2, pk2cmd, and SDCC to program a PIC18F24J10. In the course of troubleshooting some problems I was having with my code, I upgraded to SDCC 3.4.0. Compiling with the latest version gave me a warning, "The code generated by SDCC does probably not work when XINST is enabled (possibly by default)." So, I've gone ahead and disabled it via
#pragma config XINST=OFF
And now it doesn't program with pk2cmd, giving me the following error:
Program Memory Errors Address Good Bad 003FFE 00FFFF 00F000 VDD Error detected. Check target for proper connectivity.
Without the XINST=OFF line, it programs successfully. I can swap back and forth between having no change with Success and having XINST=OFF with Failure.