Hi,
in the past couple of months I have programmed an LPC2294 without
problem via usb-ocd-tiny and openocd in Windows. Now I’m changing to
linux and last week I installed the OpenOcd svn version (568) on my
Ubuntu PC. After building the usb drivers and openocd, I could connect
to my lpc2294. But I cant seem to program it. I get an error on the
flash write_image main.bin 0x0 bin command,
Error in terminal: lpc2000 returned 6
error writing to flash at address 0x00000000 at offset 0x00000000 (-902)
(in the older windows version I used flash erase instead of flash
erase_sector and flash write instead of flash write_image)
can someone tell what I’m doing wrong?
My config file:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc “Olimex OpenOCD JTAG TINY A”
ft2232_layout “olimex-jtag”
ft2232_vid_pid 0x15BA 0x0004
jtag_speed 1
#use combined on interfaces or targets that can’t set TRST/SRST separately
reset_config trst_and_srst separate
#jtag scan chain
#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
target_script 0 reset h2294_init.script
#target_script 0 reset flash_int.script
run_and_halt_time 0 30
#target_script 0 reset oocd_flash2138.script
working_area 0 0x40000000 0x40000 nobackup
#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v2 14746 calc_checksum #OK
flash bank cfi 0x80000000 0x200000 2 2 0
For more information about the configuration files, take a look at:
http://openfacts.berlios.de/index-en.ph … p+Debugger
init script:
arm7_9 write_xpsr 0x000000d3 0
mww 0xE01FC040 0x00000001
mww 0xE01FC080 0x00000001
mww 0xE01FC084 0x00000023
mww 0xE01FC08C 0x000000AA
mww 0xE01FC08C 0x00000055
sleep 10
mww 0xFFE00004 0x22000400
mww 0xFFE00000 0x10002C65
mww 0xE002C014 0x0F014924
sleep 10
arm7_9 force_hw_bkpts disable
flash script:
halt 0
arm7_9 dcc_downloads enable
wait_halt
sleep 10
poll
flash probe 0
flash erase_sector 0 0 0
flash write_image main.bin 0x0 bin
resume 0
Greetings,
Yussel