# LPC-H2148 and programming flash with OpenOCD

**URL:** <https://community.sparkfun.com/t/lpc-h2148-and-programming-flash-with-openocd/2592>\
**Category:** MicroMod\
**Tags:** arm-lpc\
**Created:** [September 3, 2006, 8:26pm UTC](https://community.sparkfun.com/t/lpc-h2148-and-programming-flash-with-openocd/2592 "2006-09-03T20:26:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![christophe\_baranger](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@christophe\_baranger](https://community.sparkfun.com/u/christophe_baranger)\
**Post date:** [September 3, 2006, 8:26pm UTC](https://community.sparkfun.com/t/lpc-h2148-and-programming-flash-with-openocd/2592/1 "2006-09-03T20:26:01Z")

</div>

I have the LPC-H2148 from Olimex and I would like to load the example USB demo to the flash board, using JTAG + OCD. But I was not able to complete all things in order to have everythings working. So, As I am a newbie, I suppose I did something wrong :

My configuration file for openocd is the following :

#daemon configuration

telnet\_port 4444

gdb\_port 3333

#interface

interface parport

parport\_port 0x378

parport\_cable wiggler

jtag\_speed 0

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 lpc2000\_v2 0 12000 calc\_checksum

It seems that I have no problem to connect to the board, and I try to download the lpc2148\_USB.hex file (from the olimex Website) with the following procedure :

> poll

target state: halted

target halted in ARM state due to debug request, current mode: Undefined

cpsr: 0x600000db pc: 0x00000008

> flash probe 0

flash ‘lpc2000’ found at 0x00000000

> flash erase 0 0 0

> flash write 0 c:\lpc2148\_USB.hex 0

wrote file c:\lpc2148\_USB.hex to flash bank 0 at offset 0x00000000 in 1s 882707us

> reset run

> poll

target state: running

> 

But the moving cursor usb demo is not working…

Any help will be greatly appreciate,

Best regards.

---

<div class="post-metadata">

**Author:** ![Dominic](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Dominic](https://community.sparkfun.com/u/Dominic)\
**Post date:** [September 3, 2006, 10:24pm UTC](https://community.sparkfun.com/t/lpc-h2148-and-programming-flash-with-openocd/2592/2 "2006-09-03T22:24:06Z")

</div>

See my reply in the OpenOCD forum.

Regards,

Dominic
