1
Project logs / Re: Free PCB build - UBW32
Thanks for your answer. I have modified PK2DeviceFile.dat file using the device file editor and advanced a bit in the debug.
I now have:
Quote
./pk2cmd -P -WBut I still have an error if I try to check if memory is blank:
Auto-Detect: Found part PIC32MX534F064H.
Quote
./pk2cmd -C -PPIC32MX534F064H -I -W
Downloading Programming Executive...
...FAILED. ReadPEVersion:0. wanted:265
memory is NOT blank.
I have added a bit of debug to the pk2cmd source files (I use pk2cmd on a Linux computer but I have the same error on a windows computer with the standard microchip tool) to try to see where the error comes from.
So to be able to read RAM or flash, there are lots of steps well described in PIC32MX flash programming specification (http://http://ww1.microchip.com/downloads/en/DeviceDoc/61145J.pdf) and pk2cmd follows these steps. My error is a bus error (timeout). The PICkit returns a status indicating that communication between PICkit and target board has failed.
My error occurs in step 7. We have just copied a small executable to target RAM (pe_loader) and try to execute it to load another program to RAM. In PICKit2cmd source code, error is detected in function CPICkitFunctions::DownloadPE by the call to BusErrorCheck function done after step 7-A. I am quite stucked here. I have only the machine code of the PE_loader, I can't read it and I am quite sure there is no error in the pkcmd2 code (this code is used to read/write flash for all PIC32 devices).
My guess was that RAM mapping on my board was different from PIC32MX320F064H RAM mapping but it looks OK.
Any idea is welcomed,
Christophe