Problems debugging str712 evb

Another board, another problem!

Now I work with an Olimex/IAR str712f evb and signalizer.

I also use eclipse package from yagarto (yagarto-ide-20060806-setup), and GNUARM as toolchain.

The openocd configuration script is:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Signalyzer A"
ft2232_layout signalyzer
ft2232_vid_pid 0x0403 0xbca0
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
run_and_halt_time 0 30

working_area 0 0x2000C000 0x4000 nobackup

#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank str7x 0x40000000 0x00040000 0 0 STR71x 0

I can write flash with no problem, and I can start a debug session.

In eclipse I have set che gdb command as follow:

target remote localhost:3333
monitor reset
monitor sleep 500
monitor poll
monitor soft_reset_halt
monitor arm7_9 sw_bkpts disable
monitor arm7_9 force_hw_bkpts enable
symbol-file led_blink.elf
thbreak main
continue

Once launched the debugging session the program flow correctly stops at main(), but if I try to step to another instruction I obtain an error:

Execution is suspended because of error.
  Warning:
  Cannot insert breakpoint 3.
  Error accessing memory address 0x400005cc: (undocumented errno -1).

and this is what is reported on openocd console:

Info:    openocd.c:82 main(): Open On-Chip Debugger (2006-09-28 20:00 CEST)
Warning: arm7_9_common.c:679 arm7_9_assert_reset(): srst resets test logic, too
Info:    server.c:67 add_connection(): accepted 'telnet' connection from 0
Warning: arm7_9_common.c:785 arm7_9_halt(): target was already halted
Info:    server.c:67 add_connection(): accepted 'gdb' connection from 0
Warning: arm7_9_common.c:679 arm7_9_assert_reset(): srst resets test logic, too
Info:    arm7_9_common.c:280 arm7_9_add_breakpoint(): no watchpoint unit available for hardware breakpoint
Info:    breakpoints.c:65 breakpoint_add(): can't add software breakpoint, resource not available
Warning: arm7_9_common.c:145 arm7_9_set_breakpoint(): breakpoint already set
Warning: arm7_9_common.c:145 arm7_9_set_breakpoint(): breakpoint already set
Warning: arm7_9_common.c:145 arm7_9_set_breakpoint(): breakpoint already set
Warning: arm7_9_common.c:145 arm7_9_set_breakpoint(): breakpoint already set
Warning: arm7_9_common.c:145 arm7_9_set_breakpoint(): breakpoint already set
Info:    arm7_9_common.c:280 arm7_9_add_breakpoint(): no watchpoint unit available for hardware breakpoint
Info:    breakpoints.c:65 breakpoint_add(): can't add software breakpoint, resource not available
Info:    arm7_9_common.c:280 arm7_9_add_breakpoint(): no watchpoint unit available for hardware breakpoint
Info:    breakpoints.c:65 breakpoint_add(): can't add software breakpoint, resource not available

It seems that it want to use software breakpoint but I have explicitly disabled this feature and enabled only hw.

thanks

There are only two breakpoints available, and the debugger fails when trying to insert breakpoint 3. Try to remove the breakpoint you set for main before stepping the program.

Regards,

Magnus

mlu:
There are only two breakpoints available, and the debugger fails when trying to insert breakpoint 3. Try to remove the breakpoint you set for main before stepping the program.

I cannot remove it because I have never set 3 breakpoints.

The only breakpoint I set is thbreak main that means Temporary Hardware Break. Once it occurs it should be removed.

The problem is when I try to step into or step over, without explicitly set any breakpoints.

I have no breakpoint in my debug session.

thanks

There’s a new version of the OpenOCD with improved breakpoint handling, for which Michael is going to provide binaries soon. I believe this is what’s affecting you, so you could either try to build the OpenOCD yourself from latest sources (see http://openfacts.berlios.de/index-en.ph … ng_OpenOCD) or wait for a new binary.

Explicitly turning sw bkpts off isn’t necessary - they’re off by default, and force_hw_bkpts would turn them off, too.

Regards,

Dominic

I have has this same problem for some time too.

I managed to come up with a work round, then my .workspace in Eclipse got corrupted and I lost it - F****

Any news on a binary of the latest OpenOCD? - I must have a go at compiling it sometime…

BTW I don’t think the problem is OCD, if you do a bp in a telnet connection to OCD it says there are no breakpoints allocated, yet Eclipse thinks there are, methinks somebody can’t count, either that or the gdb interface thinks they are allocated but that is not synchronised with the telnet interface.