Hi all,
I'm having trouble with basic operation with AT91SAM7X256-EK. I am
using openocd with ARM-USB-OCD. I also have a Segger J-Link that
yields similar results. I can write a program to internal flash at
0x100000 but the when I resume, I can't halt. Here are some
configuration files.
openocd.cfg
#interface jlink
source [find interface/olimex-arm-usb-ocd.cfg]
adapter_khz 6000
source [find target/at91sam7x256.cfg]
gdb_breakpoint_override hard
arm7_9 dcc_downloads enable
sam7x256.cpu configure -event gdb-attach soft_reset_halt
gdb_memory_map disable
debug_level 3
EOF
.gdbinit
target remote localhost:3333
symbol-file rtosdemo.elf
#monitor poll
#
#monitor reset init
#monitor sleep 500
#
#### needed for gdb 6.8 and higher
#set mem inaccessible-by-default off
#monitor flash probe 0
#
#monitor gdb_breakpoint_override hard
#monitor arm7_9 dcc_downloads enable
## monitor arm7_9 fast_memory_access enable
define flash
monitor soft_reset_halt
monitor flash write_image rtosdemo.bin 0x100000 bin
symbol-file rtosdemo.elf
end
document flash
flash: write rtosdemo.bin to 0x100000 and reset the processor
end
EOF
The commented out stuff came from http://zwizwa.be/darcs/papers/arm.txt .
When I run openocd (as root), I get the following (near the end).
Debug: 2727 14096 arm7_9_common.c:1639 arm7_9_restore_context():
examining Supervisor mode
Debug: 2728 14096 arm7_9_common.c:1653 arm7_9_restore_context():
examining dirty reg: pc
Debug: 2729 14096 arm7_9_common.c:1639 arm7_9_restore_context():
examining Supervisor mode
Debug: 2730 14096 arm7_9_common.c:1653 arm7_9_restore_context():
examining dirty reg: pc
Debug: 2731 14096 arm7_9_common.c:1739 arm7_9_restore_context():
writing cpsr with value 0x000000d3
Debug: 2732 14096 arm7tdmi.c:414 arm7tdmi_write_xpsr(): xpsr: 000000d3, spsr: 0
Debug: 2733 14096 arm7_9_common.c:1749 arm7_9_restore_context():
writing PC with value 0x00000000
Debug: 2734 14096 embeddedice.c:501 embeddedice_write_reg(): 0: 0x00000000
Debug: 2735 14097 target.c:1063 target_call_event_callbacks(): target
event 4 (resumed)
Debug: 2736 14097 arm7_9_common.c:1982 arm7_9_resume(): target resumed
Debug: 2737 24738 gdb_server.c:2200 gdb_input_inner(): received packet: ''
Debug: 2738 24738 arm7_9_common.c:1295 arm7_9_halt(): target->state: running
Debug: 2739 24738 embeddedice.c:501 embeddedice_write_reg(): 9: 0xffffffff
Debug: 2740 24738 embeddedice.c:501 embeddedice_write_reg(): 11: 0xffffffff
Debug: 2741 24738 embeddedice.c:501 embeddedice_write_reg(): 12: 0x00000100
Debug: 2742 24738 embeddedice.c:501 embeddedice_write_reg(): 13: 0x000000f7
Info : 2743 25758 target.c:437 target_poll(): Halt timed out, wake up GDB.
Debug: 2744 25758 target.c:1063 target_call_event_callbacks(): target
event 2 (gdb-halt)
Debug: 2745 25759 gdb_server.c:2200 gdb_input_inner(): received packet: 'g'
Error: 2746 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2747 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2748 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2749 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2750 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2751 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2752 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2753 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2754 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2755 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2756 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2757 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2758 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2759 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2760 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2761 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Error: 2762 25759 armv4_5.c:478 armv4_5_get_core_reg(): Target not halted
Debug: 2763 25759 gdb_server.c:2200 gdb_input_inner(): received packet: 'm0,4'
Debug: 2764 25759 gdb_server.c:1278 gdb_read_memory_packet(): addr:
0x00000000, len: 0x00000004
Debug: 2765 25759 target.c:1444 target_read_buffer(): reading buffer
of 4 byte at 0x00000000
Debug: 2766 25759 arm7_9_common.c:2271 arm7_9_read_memory(): address:
0x00000000, size: 0x00000004, count: 0x00000001
Warn : 2767 25759 arm7_9_common.c:2275 arm7_9_read_memory(): target not halted
EOF
I have tried 0.4.0, 0.5.0, and the latest from git. The above is from
the latest from git. I am doing this on Fedora 16 with arm-elf-gcc
4.6.2 and arm-elf-gdb 7.3.1. Flashing and debugging with the same
firmware worked earlier today and mysteriously stopped working. I
upgraded openocd and my system in response to try and rule out
problems with out of date software. Any insight into why I'm having
trouble will be stellar.
Kindly,
ks
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel