mlu:
Make sure that the flash sectors you are writing to are unprotected and erased.
OK, I did some more poking around and am not sure I have the flash banks setup properly for OpenOCD.
Here is some info I got:
> debug_level 3
> flash banks
#0: lpc2000 at 0x00000000, size 0x00040000, buswidth 0, chipwidth 0
#1: cfi at 0x80000000, size 0x00400000, buswidth 2, chipwidth 2
> flash info 0
#0: lpc2000 at 0x00000000, size 0x00040000, buswidth 0, chipwidth 0
#0: 0x00000000 (0x2000kB) erase state unknown, protected
#1: 0x00002000 (0x2000kB) erase state unknown, protected
#2: 0x00004000 (0x2000kB) erase state unknown, protected
#3: 0x00006000 (0x2000kB) erase state unknown, protected
#4: 0x00008000 (0x2000kB) erase state unknown, protected
#5: 0x0000a000 (0x2000kB) erase state unknown, protected
#6: 0x0000c000 (0x2000kB) erase state unknown, protected
#7: 0x0000e000 (0x2000kB) erase state unknown, protected
#8: 0x00010000 (0x10000kB) erase state unknown, protected
#9: 0x00020000 (0x10000kB) erase state unknown, protected
#10: 0x00030000 (0x2000kB) erase state unknown, protected
#11: 0x00032000 (0x2000kB) erase state unknown, protected
#12: 0x00034000 (0x2000kB) erase state unknown, protected
#13: 0x00036000 (0x2000kB) erase state unknown, protected
#14: 0x00038000 (0x2000kB) erase state unknown, protected
#15: 0x0003a000 (0x2000kB) erase state unknown, protected
#16: 0x0003c000 (0x2000kB) erase state unknown, protected
#17: 0x0003e000 (0x2000kB) erase state unknown, protected
lpc2000 flash driver variant: 1, clk: 14765
> flash info 1
#1: cfi at 0x80000000, size 0x00400000, buswidth 2, chipwidth 2
cfi information:
mfr: 0x0000, id:0x0000
qry: '', pri_id: 0x0000, pri_addr: 0x0000, alt_id: 0x0000, alt_addr: 0x0000
Vcc min: 0.0, Vcc max: 0.0, Vpp min: 0.0, Vpp max: 0.0
typ. word write timeout: 1, typ. buf write timeout: 1, typ. block erase timeout: 1, typ. chip erase timeout: 1
max. word write timeout: 1, max. buf write timeout: 1, max. block erase timeout: 1, max. chip erase timeout: 1
size: 0x1, interface desc: 0, max buffer write size: 0
> flash protect 0 0 17 off
cleared protection for sectors 0 through 17 on flash bank 0
> flash erase 0 0 17
erased sectors 0 through 17 on flash bank 0 in 0s 609375us
> flash info 0
#0: lpc2000 at 0x00000000, size 0x00040000, buswidth 0, chipwidth 0
#0: 0x00000000 (0x2000kB) erase state unknown, protected
#1: 0x00002000 (0x2000kB) erase state unknown, protected
#2: 0x00004000 (0x2000kB) erase state unknown, protected
#3: 0x00006000 (0x2000kB) erase state unknown, protected
#4: 0x00008000 (0x2000kB) erase state unknown, protected
#5: 0x0000a000 (0x2000kB) erase state unknown, protected
#6: 0x0000c000 (0x2000kB) erase state unknown, protected
#7: 0x0000e000 (0x2000kB) erase state unknown, protected
#8: 0x00010000 (0x10000kB) erase state unknown, protected
#9: 0x00020000 (0x10000kB) erase state unknown, protected
#10: 0x00030000 (0x2000kB) erase state unknown, protected
#11: 0x00032000 (0x2000kB) erase state unknown, protected
#12: 0x00034000 (0x2000kB) erase state unknown, protected
#13: 0x00036000 (0x2000kB) erase state unknown, protected
#14: 0x00038000 (0x2000kB) erase state unknown, protected
#15: 0x0003a000 (0x2000kB) erase state unknown, protected
#16: 0x0003c000 (0x2000kB) erase state unknown, protected
#17: 0x0003e000 (0x2000kB) erase state unknown, protected
lpc2000 flash driver variant: 1, clk: 14765
> flash write_image U:\Devel\ARM\LPC2148\USB\hid\examples\custom.hex 0 hex
failed writing image U:\Devel\ARM\LPC2148\USB\hid\examples\custom.hex: flash program error
wrote 0 byte from file U:\Devel\ARM\LPC2148\USB\hid\examples\custom.hex in 0s 390625us (0.000000 kb/s)
>
I have the [LPC2148 Header Board. What am I doing wrong? I must go reread my LPC2148 datasheet.
8-Dale](http://www.sparkfun.com/commerce/product_info.php?products_id=676)