Although I normally use CrossWorks I’d like to get OpenOCD and Insight working with a parallel port JTAG I/F for the EA LPC2148 system. When I run OpenOCD-pp I get the following errors:
C:\Program Files\openocd-2007re204\bin>openocd-pp
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Error: lpc2000.c:384 lpc2000_flash_bank_command(): unknown LPC2000 variant
Error: flash.c:180 handle_flash_bank_command(): ‘lpc2000’ driver rejected flas
h bank at 0x00000000
Warning: arm7_9_common.c:734 arm7_9_assert_reset(): srst resets test logic, too
Error: arm_jtag.c:38 arm_jtag_set_instr_error_handler(): setting the new JTAG
instruction failed, debugging is likely to be broken
I’m using this cfg file that is supposed to be for the LPC2148:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface parport
parport_port 0x378
parport_cable wiggler
jtag_speed 5
#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_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30
flash-options LPC2138
working_area 0 0x40000000 0x4000 nobackup
LPC2138 @ 12MHz / 0x7D000 from 500*1024 (not 512!)
flash bank lpc2000 0x0 0x7D000 0 0 lpc2000_v2 0 12000 calc_checksum
For more information about the configuration files, take a look at:
mifi
October 29, 2007, 5:29pm
2
Hi Leon,
the syntax has changed, your line:
flash bank lpc2000 0x0 0x7D000 0 0 lpc2000_v2 0 12000 calc_checksum
must be changed to:
flash bank lpc2000 0x0 0x7D000 0 0 0 lpc2000_v2 12000 calc_checksum
Take a look here too:
http://openfacts.berlios.de/index-en.ph … figuration
AS OF R189, the order of arguments will be switched to: flash bank lpc2000 0 0 <target#>
Perhaps this will help you?
Best regards,
Michael
Hi,
as Michael already mentioned the LPC2000 flash bank command changed, but that’s only a small problem.
The real issue is the
“Error: arm_jtag.c:38 arm_jtag_set_instr_error_handler(): setting the new JTAG instruction failed, debugging is likely to be broken”
You could try the
jtag_ntrst_delay and jtag_nsrst_delay options (n in miliseconds) to give your target more time after the reset. It looks like the OpenOCD tried to select a new JTAG instruction too soon after releasing the reset.
Regards,
Dominic
Thanks. I tried both those suggestions but get this now, with really long delays (5000):
C:\Program Files\openocd-2007re204\bin>openocd-pp
Info: openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Error: jtag.c:1253 jtag_examine_chain(): JTAG communication failure, check con
nection, JTAG interface, target power etc.
Error: jtag.c:1440 jtag_init(): trying to validate configured JTAG chain anywa
y…
Error: arm_jtag.c:38 arm_jtag_set_instr_error_handler(): setting the new JTAG
instruction failed, debugging is likely to be broken
I seem to be getting closer, though.
Leon
leon_heller:
I seem to be getting closer, though.
Leon
Did you get it all to work? I'm back to tinkering with my LPC2148 boards now. Do you have a good reset script for it?
8-Dale