Greetings,
I am trying to flash a LPC2103 using openocd and amontec tini JTAGkey and running into issues where openocd does not read the script file. Here’s my configuration file: It connects and I can program it if I execute the script in telnet, but I would like do it automatically through the script.
#daemon configuration
telnet_port 4444
gdb_port 3333
interface ft2232
ft2232_device_desc "Amontec JTAGkey A"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0xcff8
jtag_speed 10
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
#jtag nTRST and nSRST delay
jtag_nsrst_delay 250
jtag_ntrst_delay 250
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
target_script 0 reset temp.ocd
run_and_halt_time 0 30
daemon_startup reset
working_area 0 0x40000000 0x40000 nobackup
#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum
flash bank cfi 0x80000000 0x400000 2 2 0
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
# or
# http://www.amontec.com/sdk4arm.shtml
What I meant by it does not read the script is that temp.ocd is my script to that would flash the LPC2103 but it seems like openocd never executes that line (target_script 0 reset temp.ocd). I come to this conclusion because if there is no file name after reset, then it complains that there is no file specified for target_script but if I specify a non-existing file, it never complains that it could not find the file.
I added that extra line of “daemon_startup reset” thinking that may be the processor never gets reset and I have reseting the processor manually both using the telnet and shorting the RST pin in the processor and it still does not see it.
I have looked up all over the place it seems like my configuration file is pretty standard but for some reason I am having issues with this.
I would really appreciate if somebody could point out what I am doing wrong.
Thanks,
-daa