not stop at breakpoint main() debugging Eclipse+OpenOCD

Hi,

I’m debugging a test program for Olimex LPC2148 board using GNU ARM toolchain.

The tool chain is below.

OpenOCD :r128-rc01

YAGARTO GNU ARM toolchain :First version

YAGARTO IDE

I got this toolchain from YAGARTO site.

I meet with the following problem and am troubled.

I launch an OpenOCD thread from External tool button of toolbar of Eclipse.

I launch a debugger theard from Insect button of toolbar of Eclipse next.

I hope that execution stops at entrance of main() function.

However, execution stops somewhere without stopping at main() function.

The thread of debugger becomes suspended.

I resume the execution from Resume button of toolbar of eclipse.

The execution does not stop at main() function in this operation either.

I suspend the execution from Suspend button of toolbar of eclipse.

The place that stopped is the inside of main() function.

How do I set it so that execution stops at entrance of main() function ?

I show my current setting in the following.

OpenOCD configuration:

#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

#reset configration

reset_config trst_and_srst srst_pulls_trst

jtag_device 4 0x1 0xf 0xe

jtag_nsrst_delay 333

jtag_ntrst_delay 333

#target configuration, what to do on a target reset

target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4

run_and_halt_time 0 30

daemon_startup reset

#target_script 0 reset openocd.script

working_area 0 0x40000000 0x4000 nobackup

flash bank lpc2000 0 0 <target#> [‘calc_checksum’]

mthomas: LPC2138 @ 12MHz 0x7D000 from 500*1024 (not 512!)

flash bank lpc2000 0x0 0x7D000 0 0 lpc2000_v2 0 12000 calc_checksum

GDB initialize commands:

target remote localhost:3333

monitor reset

monitor sleep 500

monitor poll

monitor flash probe 0

monitor flash erase 0 0 0

monitor flash write 0 main.bin 0x0

monitor sleep 500

monitor soft_reset_halt

monitor arm7_9 force_hw_bkpts enable

symbol-file main.out

thbreak main

continue

Thanks.

I think that probably I was able to solve this problem.

The information about the setting was written on “Eclipse CDT plugin” page of Zylin site.


delp2

I’m having the same problem and didn’t see the solution on the Zylin site. Would you mind describing the settings or procedure that solved the issue for you? Thanks.

Hi,

I found hints of solution of my problem in “Eclipse CDT plugin”-“Download”-“Latest snapshot” page of Zylin site.

I think so that description about issuing commands from Eclipse is written here.

I set Eclipse as follows.

In addition, configuration of OpenOCD does not have a change. Please see above topic.

  1. With Debugger tab in the dialogue opended from Insect button, check ‘Stop on start at’ box.

  2. With Commands tab, set next commands into the ‘Initialize’ commands box.

target remote localhost:3333

monitor reset

monitor sleep 500

monitor poll

monitor flash probe 0

monitor flash erase 0 0 0

monitor flash write 0 main.bin 0x0

monitor sleep 500

monitor soft_reset_halt

monitor arm7_9 force_hw_bkpts enable

  1. With Commands tab, set next command into the ‘Run’ commands box.

continue

I wonder a little that the debugger can distinguish function main() though I explicitly does not specify the symbol file.

It may be the effect that did checking ‘Stop on startup at’ box…


delp2