EmbDev.net

Forum: ARM programming with GCC/GNU tools Sporatic Debugger Problem


Author: patterr (Guest)
Posted on:

Rate this post
0 useful
not useful
I frequently have this problem, it has driven me nuts.  I find that I 
can compile any size (ie: 1K - >70K) program, download it to my target 
(AT91SAM7X512), and it runs just fine. However, the debugger usually 
only works on smaller projects; once it gets too big, Eclipse throws the 
error "Execution is suspended because of error. The program is not being 
run."  The size of the code when this happens varies a bit - sometimes 
it's when the flash size exceeds 13852 bytes, other times 14124 bytes, 
etc.  I find that when I'm at the 'breaking point' even a single 
asm("nop") will break it.

The output of arm-none-eabi-gdb is:
symbol-file "D:\\Temp\\Analog IF\\Analog IF\\main_fsh.elf"
target remote localhost:3333
warning: while parsing target memory map (at line 2): Required element <memory> is missing
0x000005b8 in LowLevelInit () at Source/lowlevelinit.c:61
61    while(!(pPMC->PMC_SR & AT91C_PMC_MOSCS));
tbreak main
Temporary breakpoint 2 at 0x220: file Source/main.c, line 60.
monitor soft_reset_halt
"monitor" command not supported by this target.
monitor armv4_5 core_state arm
"monitor" command not supported by this target.
monitor mww 0xffffff60 0x00320100
"monitor" command not supported by this target.
monitor mww 0xfffffd44 0xa0008000
"monitor" command not supported by this target.
monitor mww 0xfffffc20 0xa0000601
"monitor" command not supported by this target.
monitor wait 100
"monitor" command not supported by this target.
monitor mww 0xfffffc2c 0x00480a0e
"monitor" command not supported by this target.
monitor wait 200
"monitor" command not supported by this target.
monitor mww 0xfffffc30 0x7
"monitor" command not supported by this target.
monitor wait 100
"monitor" command not supported by this target.
monitor mww 0xfffffd08 0xa5000401
"monitor" command not supported by this target.
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed
monitor arm7_9 force_hw_bkpts enable
"monitor" command not supported by this target.
continue
The program is not being run.

However, if I reduce my code a bit so that the debugger works, then the 
output of arm-none-eabi-gdb is:
symbol-file "D:\\Temp\\Analog IF\\Analog IF\\main_fsh.elf"
target remote localhost:3333
warning: while parsing target memory map (at line 2): Required element <memory> is missing
LowLevelInit () at Source/lowlevelinit.c:96
96    while (!(*AT91C_PMC_SR & AT91C_PMC_MCKRDY));
tbreak main
Temporary breakpoint 2 at 0x220: file Source/main.c, line 60.
monitor soft_reset_halt
monitor armv4_5 core_state arm
monitor mww 0xffffff60 0x00320100
monitor mww 0xfffffd44 0xa0008000
monitor mww 0xfffffc20 0xa0000601
monitor wait 100
monitor mww 0xfffffc2c 0x00480a0e
monitor wait 200
monitor mww 0xfffffc30 0x7
monitor wait 100
monitor mww 0xfffffd08 0xa5000401
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed
monitor arm7_9 force_hw_bkpts enable
continue

Any ideas of what could cause this?  My toolset is Eclipse Helios SP 2, 
CDT 1.0.0.201102110609, arm-none-eabi-gcc 4.60, arm-none-eabi-objcopy 
2.21, arm-none-eabi-gdb 7.2, OpenOCD 717, and Olimex ARM_USB_TINY JTAG 
interface.

Also, Eclipse launches OpenOCD with this configuration for debug:
telnet_port 4444
gdb_port 3333

interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 2
jtag_nsrst_delay 200
jtag_ntrst_delay 200

reset_config srst_only srst_pulls_trst

jtag_device 4 0x1 0xf 0xe

daemon_startup reset

target arm7tdmi little run_and_init 0 arm7tdmi_r4

run_and_halt_time 0 30

Lastly, my debug configuration is to use arm-none-eabi-gdb with an 
initialization command of
target remote localhost:3333
 and Run Commands of
monitor soft_reset_halt
monitor armv4_5 core_state arm
monitor mww 0xffffff60 0x00320100
monitor mww 0xfffffd44 0xa0008000
monitor mww 0xfffffc20 0xa0000601
monitor wait 100
monitor mww 0xfffffc2c 0x00480a0e
monitor wait 200
monitor mww 0xfffffc30 0x7
monitor wait 100
monitor mww 0xfffffd08 0xa5000401
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed
monitor arm7_9 force_hw_bkpts enable
continue

I have a feeling the problem has something to do with that fact that 
arm-none-eabi-gdb spits out ""monitor" command not supported by this 
target."  I just can't imagine what's causing this, could it be OpenOCD?

Thanks!
Ryan

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.