Getting error in flash programming LPC2468 using OLIMEX JTAG

Hello

Can someone help me please for above. I am using openocd ftd2xx.exe with USB-JTAG h/w & getting following error

“Failed erasing sectors 0 to 8 (-304)”.

Interface is able to find JTAG device , I am executing following command line

openocd-ftd2xx.exe -flpc2468.cfg -c “init” -c “flash write_image erase file_name.elf 0 elf”

Using following in config

NXP LPC2478 ARM7TDMI-S with 512kB Flash and 64kB Local On-Chip SRAM (98kB total),

#clocked with 4MHz internal RC oscillator

#daemon configuration

telnet_port 4444

gdb_port 3333

#interface

interface ft2232

ft2232_device_desc “Olimex OpenOCD JTAG A”

ft2232_layout “olimex-jtag”

ft2232_vid_pid 0x15BA 0x0003

#jtag_speed 2

#use combined on interfaces or targets that can’t set TRST/SRST separately

#delays on reset lines

jtag_nsrst_delay 100

jtag_ntrst_delay 100

LPC2000 → SRST causes TRST

reset_config trst_and_srst srst_pulls_trst

#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 4 0x1 0xf 0xe

#target configuration

#daemon_startup reset

#target

#target arm7tdmi

#target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4

#run_and_halt_time 0 30

target arm7tdmi little run_and_init 0 arm7tdmi-s_r4

run_and_halt_time 0 30

#target arm7tdmi little reset_init 0 arm7tdmi-s_r4

#run_and_halt_time 0 30

target_script 0 post_halt c:\gccfd\openocd\bin\LPC2478_reset.script

working_area 0 0x40000000 0x10000 nobackup

#flash configuration

#flash bank $_FLASHNAME lpc2000 0x0 0x7D000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum

flash bank lpc2000 0x0 0x7D000 0 0 0 lpc2000_v2 12000 calc_checksum

For more information about the configuration files, take a look at:

http://openfacts.berlios.de/index-en.ph … p+Debugger

jtag_khz 500

gdb_flash_program enable

RESET config is as here under

mww 0xE01FC040 0x01

thanks VKP