Hi,
I am new to ARM processors. When I was trying to flash program Olimex LPC2103 development board, I got the following failure.
flash write_image main.bin
timed out while waiting for target halted
target not halted
error writing to flash at address 0x00000000 at offset 0x00000000 (-902)
Command handler execution failed
in procedure ‘flash’
Can anyone help me to fix this issue.
I have used the standard lpc2103.cfg file ( comes with the openocd ). I am using the latest OpenOCD build ( 4.0.0 + ) .
./openocd -f lpc2103.cfg
Open On-Chip Debugger 0.5.0-dev (2010-09-01-14:16)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Warn : Adapter driver ‘mycable’ did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect ‘jtag’
4000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : JTAG tap: lpc2103.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part: 0xf1f0, ver: 0x4)
Info : Embedded ICE version 4
Info : lpc2103.cpu: hardware has 2 breakpoint/watchpoint units
This is the output from the telnet localhost 4444 window
===========================================
telnet localhost 4444
Trying 127.0.0.1…
Connected to localhost.localdomain (127.0.0.1).
Escape character is ‘^]’.
Open On-Chip Debugger
halt
target state: halted
target halted in Thumb state due to debug-request, current mode: System
cpsr: 0x4000003f pc: 0x00000290
flash erase_sector 0 0 7
timed out while waiting for target halted
target not halted
erased sectors 0 through 7 on flash bank 0 in 10.103952s
targets
TargetName Type Endian TapName State
0* lpc2103.cpu arm7tdmi little lpc2103.cpu debug-running
halt
targets
TargetName Type Endian TapName State
0* lpc2103.cpu arm7tdmi little lpc2103.cpu halted
poll
background polling: on
TAP: lpc2103.cpu (enabled)
target state: halted
target halted in Thumb state due to debug-request, current mode: System
cpsr: 0x4000003f pc: 0x0000127a
flash write_image main.bin
timed out while waiting for target halted
target not halted
error writing to flash at address 0x00000000 at offset 0x00000000 (-902)
Command handler execution failed
in procedure ‘flash’
Can anyone share me the set of OpenOCD instructions to program the flash via “telnet localhost 4444” client ?.