I am having trouble writing to flash over 4K using OpenOCD (Eclipse and Insight) on LPC-H2148. I can write small demos to flash and step or hit break points in Eclipse, but have trouble with LPCUSB which is 7K in size.
If ‘9’ is the ISP return code, then the LPC manual says this means SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION. I erased the sector before writing.
OpenOCD Version:
Info: openocd.c:86 main(): Open On-Chip Debugger (2007-04-16 19:30 CEST)
Open On-Chip Debugger
(c) 2005 by Dominic Rath
(snapshot r141 from SVN tree + giveio, no official release, compiled my mifi)
The “newer” LPC2k devices (starting with LPC213x and LPC214x) use a different sector layout. “flash info 0” shows you what the OpenOCD believes the sector layout looks like.