


Get the String containing the devicePathName. IntPtr pdevicePathName = new IntPtr(DetailDataBuffer.ToInt32() + 4) Skip over cbsize (4 bytes) to get the address of the devicePathName. SetupDiGetDeviceInterfaceDetail(DeviceInfoSet, ref MyDeviceInterfaceData, DetailDataBuffer, BufferSize, ref BufferSize, IntPtr.Zero) This time, pass a pointer to DetailDataBuffer and the returned required buffer size. Call SetupDiGetDeviceInterfaceDetail again. Marshal.WriteInt32(DetailDataBuffer, 4 + Marshal.SystemDefaultCharSize) Store cbSize in the first 4 bytes of the array IntPtr DetailDataBuffer = Marshal.AllocHGlobal(BufferSize) Allocate memory for the MyDeviceInterfaceDetailData Structure using the returned buffer size. MyDeviceInterfaceDetailData.cbSize = Marshal.SizeOf(MyDeviceInterfaceDetailData) SetupDiGetDeviceInterfaceDetail(DeviceInfoSet, ref MyDeviceInterfaceData, IntPtr.Zero, 0, ref BufferSize, IntPtr.Zero) Then step in USB.Find_This_Device, step over to the following loop for (int l_loop = 0 l_loop < 20 l_loop++) Then you can just hit F5 to continue running. } these will show the OS, AP version in your PICkit3, if the numbers look reasonable, it means the PICkit 3 should be OK with MPLAB X's firmware. Pk3h.os_typ = Usb_read_array //0x00 (my results) Pk3h.fwdownloadsuccess = (Usb_read_array = KONST.GETVERSIONS_MPLAB & ideally, step over a couple of lines, after readUSB() Then "step into" to go into the function GetVersions_MPLAB() 3. then you step over a few steps, you should be able to reach if (GetVersions_MPLAB()) otherwise it means there is some problem with the USB enumeration or connection. set breakpoint at bool result = USB.Find_This_Device(KONST.MChipVendorID, isPK3 ? KONST.Pk3DeviceID : KONST.Pk2DeviceID,pk2ID, ref usbRdTemp, ref usbWrTemp) then step over, the "result" should be "true". If you have Microsoft Visual Studio Express, you can use it to open the PICkit3V3.sln under ".\PICkit3 Programmer Application v3.10\PICkit3 Programmer Application Source v3.10\PICkit2V2" then open the PICkitFunctions.cs 1. I am not quite sure why you didn't get the yellow box message. Thank you for the replies, not sure why my standalone programmer doesn't show what's in your attachment.

I'd like to get back to that point, but I need a stand-alone programmer obviously. In the past, I've used Cygwin build of gputils with make, edit in MPLAB 8, import the build and debug from the IDE when necessary.
Pickit 3 standalone programmer software#
I have quite a bit of software that depends on gputils as it utilizes relocatable code in libraries that are located in directories other than the project (include path) and I make use of preprocessor features that are not available with MPASM Suite. Also, developing a toolchain plugin seems like it would take quite a bit of time for me to do and I need to be productive sooner than later.

I've investigated the SDK/plugin/toolchain option but have had trouble integrating the SDK into my Netbeans (8.x) IDE. My issue with MPLab X is that I can't use gputils easily. I also receive runtime errors when I exit the standalone programmer v3.10. No, I don't see the text in yellow, just that the device is not present.
