I’m trying to get an MCB2300 demo board with an LPC2387 up and running. Lacking any LPC2387 configuration files, I’ve had to start with LPC2368 examples - as far as I know they should be very similar, with just some changes in RAM sizes, but I’m new to the LPC23xx series, to OpenOCD, and to the ARM-USB-OCD.
My results are pretty inconsistent, but I can get it to erase the device’s flash. So far, though, it has never successfully programmed it. Below is the output from a typical run. Any ideas? I’ve been at this for about 6 hours and I’ve made a lot of progress with my whole Eclipse/YAGARTO/FreeRTOS setup, but now I’m stuck.
Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 2, 2
Info: options.c:50 configuration_output_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Error: armv4_5.h:114 armv4_5_mode_to_number(): invalid mode value encountered
Error: arm7_9_common.c:1102 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Info: target.c:237 target_init_handler(): executing reset script ‘program.script’
Info: options.c:50 configuration_output_handler(): dcc downloads are enabled
User: target.c:957 target_arch_state(): target state: halted
User: armv4_5.c:307 armv4_5_arch_state(): target halted in Thumb state due to debug request, current mode: Abort
cpsr: 0xa00000f7 pc: 0x7fffe156
Info: options.c:50 configuration_output_handler(): flash ‘lpc2000’ found at 0x00000000
Info: options.c:50 configuration_output_handler(): erased sectors 0 through 26 on flash bank 0 in 0.437500s
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: jtag.c:1211 jtag_check_value(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed check
Warning: arm7_9_common.c:743 arm7_9_poll(): DBGACK set, but the target did not end up in the halted stated 3
User: target.c:436 target_process_reset(): Timed out waiting for halt after reset
My configuration file is as follows:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc “Olimex OpenOCD JTAG A”
ft2232_layout “olimex-jtag”
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 2
#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
#target configuration
daemon_startup reset
#target
#target arm7tdmi
target arm7tdmi little run_and_init 0 arm7tdmi-s_r4
run_and_halt_time 0 30
working_area 0 0x40000000 0x40000 nobackup
#flash configuration
flash bank lpc2000 0x0 0x80000 0 0 0 lpc2000_v2 12000 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.ph … p+Debugger
target_script 0 reset program.script
And the program script:
arm7_9 dcc_downloads enable
wait_halt
sleep 10
poll
flash probe 0
#flash protect 0 0 26 ‘off’
flash erase_sector 0 0 26
flash write_image 0 ./RTOSDemo/RTOSDemo.bin 0x0
reset run
sleep 10
shutdown
Thanks,
Scott