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:
1 | symbol-file "D:\\Temp\\Analog IF\\Analog IF\\main_fsh.elf"
|
2 | target remote localhost:3333
|
3 | warning: while parsing target memory map (at line 2): Required element <memory> is missing
|
4 | 0x000005b8 in LowLevelInit () at Source/lowlevelinit.c:61
|
5 | 61 while(!(pPMC->PMC_SR & AT91C_PMC_MOSCS));
|
6 | tbreak main
|
7 | Temporary breakpoint 2 at 0x220: file Source/main.c, line 60.
|
8 | monitor soft_reset_halt
|
9 | "monitor" command not supported by this target.
|
10 | monitor armv4_5 core_state arm
|
11 | "monitor" command not supported by this target.
|
12 | monitor mww 0xffffff60 0x00320100
|
13 | "monitor" command not supported by this target.
|
14 | monitor mww 0xfffffd44 0xa0008000
|
15 | "monitor" command not supported by this target.
|
16 | monitor mww 0xfffffc20 0xa0000601
|
17 | "monitor" command not supported by this target.
|
18 | monitor wait 100
|
19 | "monitor" command not supported by this target.
|
20 | monitor mww 0xfffffc2c 0x00480a0e
|
21 | "monitor" command not supported by this target.
|
22 | monitor wait 200
|
23 | "monitor" command not supported by this target.
|
24 | monitor mww 0xfffffc30 0x7
|
25 | "monitor" command not supported by this target.
|
26 | monitor wait 100
|
27 | "monitor" command not supported by this target.
|
28 | monitor mww 0xfffffd08 0xa5000401
|
29 | "monitor" command not supported by this target.
|
30 | set remote memory-write-packet-size 1024
|
31 | set remote memory-write-packet-size fixed
|
32 | set remote memory-read-packet-size 1024
|
33 | set remote memory-read-packet-size fixed
|
34 | monitor arm7_9 force_hw_bkpts enable
|
35 | "monitor" command not supported by this target.
|
36 | continue
|
37 | 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:
1 | symbol-file "D:\\Temp\\Analog IF\\Analog IF\\main_fsh.elf"
|
2 | target remote localhost:3333
|
3 | warning: while parsing target memory map (at line 2): Required element <memory> is missing
|
4 | LowLevelInit () at Source/lowlevelinit.c:96
|
5 | 96 while (!(*AT91C_PMC_SR & AT91C_PMC_MCKRDY));
|
6 | tbreak main
|
7 | Temporary breakpoint 2 at 0x220: file Source/main.c, line 60.
|
8 | monitor soft_reset_halt
|
9 | monitor armv4_5 core_state arm
|
10 | monitor mww 0xffffff60 0x00320100
|
11 | monitor mww 0xfffffd44 0xa0008000
|
12 | monitor mww 0xfffffc20 0xa0000601
|
13 | monitor wait 100
|
14 | monitor mww 0xfffffc2c 0x00480a0e
|
15 | monitor wait 200
|
16 | monitor mww 0xfffffc30 0x7
|
17 | monitor wait 100
|
18 | monitor mww 0xfffffd08 0xa5000401
|
19 | set remote memory-write-packet-size 1024
|
20 | set remote memory-write-packet-size fixed
|
21 | set remote memory-read-packet-size 1024
|
22 | set remote memory-read-packet-size fixed
|
23 | monitor arm7_9 force_hw_bkpts enable
|
24 | 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:
1 | telnet_port 4444
|
2 | gdb_port 3333
|
3 |
|
4 | interface ft2232
|
5 | ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
|
6 | ft2232_layout "olimex-jtag"
|
7 | ft2232_vid_pid 0x15BA 0x0003
|
8 | jtag_speed 2
|
9 | jtag_nsrst_delay 200
|
10 | jtag_ntrst_delay 200
|
11 |
|
12 | reset_config srst_only srst_pulls_trst
|
13 |
|
14 | jtag_device 4 0x1 0xf 0xe
|
15 |
|
16 | daemon_startup reset
|
17 |
|
18 | target arm7tdmi little run_and_init 0 arm7tdmi_r4
|
19 |
|
20 | run_and_halt_time 0 30
|
Lastly, my debug configuration is to use arm-none-eabi-gdb with an
initialization command of
1 | target remote localhost:3333
|
and Run Commands of
1 | monitor soft_reset_halt
|
2 | monitor armv4_5 core_state arm
|
3 | monitor mww 0xffffff60 0x00320100
|
4 | monitor mww 0xfffffd44 0xa0008000
|
5 | monitor mww 0xfffffc20 0xa0000601
|
6 | monitor wait 100
|
7 | monitor mww 0xfffffc2c 0x00480a0e
|
8 | monitor wait 200
|
9 | monitor mww 0xfffffc30 0x7
|
10 | monitor wait 100
|
11 | monitor mww 0xfffffd08 0xa5000401
|
12 | set remote memory-write-packet-size 1024
|
13 | set remote memory-write-packet-size fixed
|
14 | set remote memory-read-packet-size 1024
|
15 | set remote memory-read-packet-size fixed
|
16 | monitor arm7_9 force_hw_bkpts enable
|
17 | 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