I am using the Olimex LPC2148 board with a wiggler/openOCD setup. Everything was working fine until several days ago.
What appears to be happening now is some of the binary I am trying to write is downloaded correctly while the later part of the binary is not transmitted correctly.
So when I look at my .bin file in a hex editor I see:
0010 18 F0 9F E5 00 00 A0 E1 F0 FF 1F E5 14 F0 9F E5
0020 40 00 00 00 AC 14 00 00 8C 14 00 00 AC 14 00 00
0030 AC 14 00 00 4C 14 00 00 6C 14 00 00 00 00 00 00
…
1540 04 20 A0 E3 00 20 83 E5 00 A8 9D E8 0D C0 A0 E1
1550 00 D8 2D E9 04 B0 4C E2 0E 32 A0 E3 7F 39 83 E2
1560 84 30 83 E2 24 20 A0 E3 00 20 83 E5 D6 FF FF EB
But when I look at a memory dump of the mcu after programming I see:
0010 18 F0 9F E5 00 00 A0 E1 F0 FF 1F E5 14 F0 9F E5
0020 40 00 00 00 AC 14 00 00 8C 14 00 00 AC 14 00 00
0030 AC 14 00 00 4C 14 00 00 6C 14 00 00 00 00 00 00
…
1540 00 20 80 E0 00 20 80 E0 00 00 80 E0 00 00 00 E0
1550 00 00 00 E0 00 20 00 E0 00 00 00 E0 00 00 00 E0
etc etc.
I don’t get any errors when downloading just a message like this:
>flash write 0 E:\eclipse\workspace\firmware\debug\firmware.bin 0
wrote 59888 byte from file E:\eclipse\workspace\firmware\debug\firmware.bin to flash bank 0 at offset 0x00000000 in 55s 377058us (1.056112 kb/s)
>
Which seems ok?
I assumed that the jtag_speed might have been too high so I set it to 10 (slowest I beleive) but then I read that it has no effect for wigglers anyway. So I threw away the parallel cable extension I was using and connected the wiggler (Olimex wiggler) directly to the PC port. But same problem.
Does anyone have any ideas what went wrong?
If it helps here is my openOCD config script in all its glory:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface parport
parport_port 0x378
parport_cable wiggler
jtag_speed 10
reset_config trst_and_srst
jtag_device 4 0x1 0xf 0xe
jtag_nsrst_delay 333
jtag_ntrst_delay 333
#target configuration
daemon_startup reset
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30
working_area 0 0x40000000 0x40000 nobackup
#flash configuration
flash bank lpc2000 0x0 0x7D000 0 0 0 lpc2000_v2 12000 calc_checksum