OpenOCD bug or bad configuration?

Hi,

I’m using fresh OpenOCD from Yagarto toolkit.

I’ve rewrite my old scripts with a new syntax.

But I can’t flash my LPC2138 controller with an OpenOCD.

This command

flash write_image erase main.elf elf

says that everithing is OK (“wrote 34728 bytes…”)

But when I try to verify

verify_image filename.elf

OpenOCD sais:

checksum mismatch - attempting binary compare
Verify operation failed address 0x00000000. Was 0x34 instead of 0x18
Runtime error, file "command.c", line 456:

It’s interesting that 0x18 and 0x34 is the “same” value it differs only by byte order.

My JTAG - Olimex ARM-USB-OCD. My controller LPC2138.

Part of my configuration file:

target create $TARGETNAME arm7tdmi -endian little -chain-position $TARGETNAME -variant arm7tdmi-s_r4
$TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
flash bank lpc2000 0x0 0x7D000 0 0 $TARGETNAME lpc2000_v2 14746 calc_checksum

[/code]

Hey Vitaliy,

Did you manage to fix your problem? I have what looks like the same issue.

wrote  1568 byte from file main.bin to flash bank 0 at offset 0x00000000 in 0.953125s (1.606557 kb/s)
target state: halted
target halted in Thumb state due to breakpoint, current mode: Supervisor
cpsr: 0xa00000f3 pc: 0x7fffd2c0
checksum mismatch - attempting binary compare
Verify operation failed address 0x00000000. Was 0x34 instead of 0x18

This is the first time I have tried flashing the chip via JTAG.

My set up:

Embedded Artists LPC2148 Education board

WINARM

JTAG - Olimex ARM-USB-TINY

Openocd-r1888

I’ll keep plugging away and let you know if I find the problem.

Thanks

Hello Vitaliy,

I’m using fresh OpenOCD from Yagarto toolkit.

What do you mean with a fresh version, please give us

some more information about the version number of OpenOCD.

I will try to test this here too.

Please take a look here too:

http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS

Best regards,

Michael