Flashing my LPC1768 fails

I soldered a LPC1768 onto an adapter-board and placed this in a breadboard.

Only the bare minimum component have been installed; eg. capacitors and resistors.

In addition a LED has been installed as well.

On my PowerMac G5, I’ve installed a nice working toolchain and OpenOCD 0.6.1, the latest official/stable version.

OpenOCD is built with libftdi 0.20 and usblib 0.1.12 (as I haven’t been able to build it with libftdi1 and usblib 1.0 yet).

Now I start OpenOCD by the following command in the terminal…

$ openocd -c "telnet_port 4444" -f interface/olimex-arm-usb-tiny-h.cfg -f target/lpc1768.cfg

Then I open another terminal window and type:

$ telnet 127.0.0.1 4444

I start issuing commands…

> adapter_khz 500
adapter speed: 500 kHz
> reset halt
JTAG tap: lpc1768.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Only resetting the Cortex-M3 core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x1fff0080 msp: 0x10001ffc
> flash banks
#0 : lpc1768.flash (lpc2000) at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0
> flash probe 0
flash 'lpc2000' found at 0x00000000
> dump_image old_image.bin 0x0 0x80000
dumped 524288 bytes in 19.029341s (26.906 KiB/s)

… So far, so good. Now I’d like to flash my own file onto the chip:

> flash write_image erase LED-Blinker.bin 0x0 bin
auto erase enabled
lpc1768.cpu -- clearing lockup after double fault
lpc1768.cpu -- clearing lockup after double fault
lpc2000 erase sectors returned 50331840
failed erasing sectors 0 to 0
in procedure 'flash'

> flash write_image erase unlock LED-Blinker.elf 
auto erase enabled
auto unlock enabled
lpc1768.cpu -- clearing lockup after double fault
lpc2000 prepare sectors returned 50331840
failed erasing sectors 0 to 0
in procedure 'flash'

> flash write_image LED-Blinker.elf             
Verification will fail since checksum in image (0x00000000) to be written to flash is different from calculated vector checksum (0xefff78c8).
To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.
lpc1768.cpu -- clearing lockup after double fault
lpc2000 prepare sectors returned 50331840
error writing to flash at address 0x00000000 at offset 0x00000000
in procedure 'flash'

(Notice the double double-fault on my first attempt to flash the chip, using the .bin file)

I also tried supplying the following script to OpenOCD on the command-line:

adapter_khz 1

source [find interface/olimex-arm-usb-tiny-h.cfg]

source [find target/lpc1768.cfg]

adapter_nsrst_assert_width 10
adapter_nsrst_delay 2
reset_config srst_only

adapter_khz 500

init
sleep 200
reset halt
wait_halt
mww 0x400FC040 0x01
sleep 200

flash write_image erase unlock LED-Blinker.bin
#flash write_image LED-Blinker.bin
verify_image LED-Blinker.bin

reset run

-But the result is the same.

I’m pretty sure my Olimex-arm-usb-tiny-h is working fine, because it flashes a SAM7-P256 without problems.

I’ve gone through each pin; pin-by-pin, testing if there are short circuits or open connections; all looks fine.

I’m measuring 3.3076V on the supply pins.

Now my main question is: What can cause this ‘lpc1768.cpu – clearing lockup after double fault’ ?

  • - An unconnected JTAG wire ?
  • - An unconnected VCC (or GND) ?
  • - A short circuited pin ?
  • - A fried chip ?
  • - Incorrect configure options for OpenOCD when it was built ?
  • - A bug in OpenOCD ?
  • - Something else ?
  • Fried chip (in my case).