I deleted my post in the arm/lpc forum as i think this is more appropriate here.
I just purchased an olimex open OCD USB tiny programmer and can’t get it to work. I have tired going through the tutorial on the YAGARTO website and updated to the most recent version of open OCD and now I get the following errors:
Info: openocd.c:86 main(): Open On-Chip Debugger (2007-04-16 19:30 CEST)
Error: embeddedice.c:181 embeddedice_build_reg_cache(): unknown EmbeddedICE version (comms ctrl: 0x00000000)
Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error: arm7_9_common.c:1019 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Error: target.c:1137 handle_target(): couldn't poll target, exiting
The first error is new now that I updated open ocd. The second and third error I had with the ocd version that came with the programmer. The third error mentions the CSPR register, does this at least mean that I am communications with the microcontroller?
Sometimes I get the error:
Info: openocd.c:86 main(): Open On-Chip Debugger (2007-04-16 19:30 CEST)
Error: ft2232.c:1287 ft2232_init_ftd2xx(): unable to open ftdi device: 2
Error: ft2232.c:1302 ft2232_init_ftd2xx(): ListDevices: 2
Error: ft2232.c:1304 ft2232_init_ftd2xx(): 0: Olimex OpenOCD JTAG TINY B
Error: ft2232.c:1304 ft2232_init_ftd2xx(): 1: xW?
To fix this I have tried playing with the configuration file by changing the ‘ft2232_device_desc’ to “Olimex OpenOCD JTAG TINY B”
Running ocd with this change to the .cfg looks like it works until I hit resume and I get a GDB popup that says “Execution suspended because of error” detail “The program is not being run.”
My .cfg for the “A” version is below:
#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 <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
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 lpc2000_v1 0 14765 calc_checksum
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
I have also tried different jtag speeds with no success.
I am trying to debug/program a LPC2138 on a OLIMEX development board.
Any help to point me in the right direction would be greatly appreciated.
Regards,
JD
[/code]