ARM7 OpenOCD problem

Hello everybody.

I have next problem:

Last week I compiled toolchain for my ARM7 (binutils-2.16.1 + newlib-1.14.0 + gcc-4.0.3 + insight-6.5). Then I tried to use openocd.

Today, at last, I was able to successfully flash my target & run it. I know, that it runs correctly, because demoboard has LCD-display. But when I run openocd server, telnet to it and type “resume”, target runs for 5-10sec. and then stops & i get “target halted in ARM state due to breakpoint, current mode: System cpsr: 0x600000df pc: 0xfc00fbe8” message in telnet session.

But hey, i don’t set any breakpoint! After constantly resuming target I got another error from openocd server “Error: target.c:1054 handle_target(): couldn’t poll target, exiting”. Then I can run openocd server again only after poweroff/poweron my board, if I don’t do it i get this error from server: “Error: jtag.c:1149 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00”.

I am using Ubuntu Linux Edgy. This is not hardware problem, as it works under windows commercial software correctly.

Please help me!

my openocd config:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface parport
parport_port 0x378
parport_cable wiggler
jtag_speed 0

#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 <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
target_script 0 reset h2294_init.script
run_and_halt_time 0 30

#flash configuration
flash bank str7x 0x40000000 0x00040000 0 0 STR71x 0
flash bank str7x 0x400C0000 0x00004000 0 0 STR71x 0
working_area 0 0x20001000 0xC000 nobackup

[/code]

pokatinzy1:

G:
Hello everybody.
I have next problem:
Last week I compiled toolchain for my ARM7 (<s…

Bad very very bad.

Maybe someone can help me by NOT writing stupid comments like this.

are you setting a breakpoint in h2294_init.script?

[edit]Also have you looked at:

arm7_9 sw_bkpts disable

arm7_9 force_hw_bkpts disable

Look at:

http://openfacts.berlios.de/index-en.ph … D_commands

under arm 7_9 specific commands

Which version of the OpenOCD did you use? A fresh checkout from SVN?

There seems to be a low-level communication problem between your board and the OpenOCD. What board is this (something you’ve built yourself?) and which ARM7 chip do you use?

Try adding:

jtag_ntrst_delay 500

jtag_nsrst_delay 500

to the config file, to give the ARM7 enough time to recover from reset.

I guess the h2294_reset.script is just a leftover from one of my examples, and it’s not going to be executed until he changes to reset_init/run_and_init or issues a “reset init” via telnet.

Regards,

Dominic

GAllen:
Also have you looked at:

arm7_9 sw_bkpts disable

arm7_9 force_hw_bkpts disable

under arm 7_9 specific commands

I have tried every command arm7_9* and different combinations, but this didn't help.

Which version of the OpenOCD did you use? A fresh checkout from SVN?

I am using the last version. Today I checked out 115 revision, compile it and the same problem. :(

There seems to be a low-level communication problem between your board and the OpenOCD. What board is this (something you’ve built yourself?) and which ARM7 chip do you use?

I am using STMicroelectronics STR712FR2T6 ARM7 chip. Board was build by other engeneer. It's an embedded solution for controlling "intellectual :) " house. There is BW graphical display, 2 LED's, MMC-card controller, some buttons, ethernet controller and a lot of other stuff.

Try adding:

jtag_ntrst_delay 500

jtag_nsrst_delay 500

Tried this - the same...

GAllen:
are you setting a breakpoint in h2294_init.script?

No-no! Reference to this non-existent script was in the example openocd.cfg file for ARM7. I don't delete it yet.

i don’t know if its any help but heres my cfg for the str710 it works on my setup with an olimex wiggler, i haven’t added the data flash bank 1 only bank 0 and you’ll need to change target run_and_init to run_and_halt on the reset if you’re not using a script.

telnet_port 4444

gdb_port 3333

interface parport

parport_port 0x378

parport_cable wiggler

jtag_speed 0

jtag_nsrst_delay 100

jtag_ntrst_delay 100

reset_config srst_only

jtag_device 4 0x1 0xf 0xe

daemon_startup reset

#target

#target arm7tdmi

target arm7tdmi little run_and_init 0 arm7tdmi

run_and_halt_time 0 1000

working_area 0 0x2000C000 0x4000 nobackup

#flash bank <chip_width> <bus_width>

flash bank str7x 0x40000000 0x00040000 0 0 STR71x 0

target_script 0 reset Myscript.script