Hi, i want to load a file ihex in the LPC2136. I use amontec jtagkey with openocd ver 0.1.0
my script is:
#interface
interface ft2232
ft2232_device_desc “Amontec JTAGkey A”
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0xcff8
telnet_port 4444
jtag_speed 5
#lpc2136
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc2136
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
force an error till we get a good number
set _CPUTAPID 0x4F1F0F0F
}
#delays on reset lines
jtag_nsrst_delay 200
jtag_ntrst_delay 200
#use combined on interfaces or targets that can’t set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME [format “%s.cpu” $_CHIPNAME]
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
$_TARGETNAME configure -event reset-init {
Force target into ARM state
soft_reset_halt
#do not remap 0x0000-0x0020 to anything but the flash
mwb 0xE01FC040 0x01
}
#flash bank lpc2000 0 0 <target#>
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v2 12000
The commands are:
openocd -f openocd.cfg -c init -c halt
…
flash protect 0 0 14 off
flash write_image erase file.hex 0 ihex
All data are write in the flash BUT NOT in the interrupt vector!
Why? Where is my error?
Thanks!