LPC-H2148 and programming flash with OpenOCD

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.

The OpenOCD expects plain binary files, I suppose the .hex from Olimex is an Intel Hex file (an ASCII format). You’ll need to convert the file, but I have to admit that I never used ihex before. GNU objcopy should be able to help.

Regards,

Dominic