OpenOCD and PIC32- how?

Hello!

I trying program PIC32 by openOCD 0.5.0 and jtagkey but i have some problem:/

I run openOCD: openocd.exe -f interface/jtagkey.cfg -f target/pic32mx.cfg

and that is effect:

http://obrazki.elektroda.pl/1329039700_1306928501.jpg

I use PIC32MX795F512H and ID of this device is 0x0430E053 so openocd read it correctly.

In latest source code from git://openocd.git.sourceforge.net/gitroot/openocd/openocd in file pic32mx.c is line:

{0x0430E053, "795F512H"}, 

Why it doesn’t work?

I’m sorry but my English is not good. I’m from Poland.

If you don’t specify a device number, oocd defaults to 0x30938053 in pic32mx.cfg.

if { [info exists CPUTAPID] } {
   set _CPUTAPID $CPUTAPID
} else {
   set _CPUTAPID 0x30938053

You should instead use a board file, that defines your chip.

# board file for PIC32MX795F512H, pic32mx.cfg. Place in /board.
set CPUTAPID 0x0430E053 
source [find target/pic32mx.cfg]

Then call oocd with:

openocd.exe -f \interface\jtagkey.cfg -f \board\pic32mx.cfg

I tried to flash a PIC32MX220F032B with openocd.

It kinda seems to work, but it is incredibly slow.

Dumping the flash content to a file needs about 10 minutes.

Flashing is even slower, I interrupted it after several hours.

It did write something, but it was shifted by several 10 bytes.

So, at this time better forget about openocd for PIC32 development.

Anyway, I don’t know what Microchip is doing with their tools.

Pickit2 and ICD2 are no longer supported, the users of the Pickit3 complain that it bricks

their PIC32 chips, and microchip refuses to support 3rd party tools like

FT2232 debuggers and openocd.

Not a pleasant situation. I think i will stay with ARM.