Tools
Codesourcery ARM Lite ( gdb 7.2.5 ,without expat support)
Openocd 0.5.0 ( compiled from source)
olimex usb-tiny jtag
OS - ubuntu 10.04
I use default config files for my board from openocd scripts directory. ( Olimex Sam9260 board)
After starting openocd session first from a telnet session , I run these commands.
halt
soft_reset_halt
debug_level 3
arm7_9 dcc_downloads disable
gdb_breakpoint_override hard
poll
reset init
After that from a gdb session below commands
arm-none-eabi-gdb vmlinux
target remote :3333
monitor set hardware-breakpoint-limit 2
monitor set hardware-watchpoint-limit 2
monitor arm7_9 dcc_downloads disable
monitor poll
monitor gdb_breakpoint_override hard
hbreak __init_begin
load
cont
PROBLEM : GDB can’t load image , Openocd error says “expected 0xC0008004 but got 0xC00080F8” ( smt like that)
(gdb) load
Loading section .note.gnu.build-id, size 0x24 lma 0x0
Loading section .text.head, size 0x3e0 lma 0xc0008000
Loading section .init, size 0x1bc20 lma 0xc00083e0
Load failed
Beside this , I can load vmlinux image with below commands in the same session ( without any modification from telnet)
(gdb) cont
Continuing.
WARNING: unknown debug reason: 0xf
ThumbEE – incomplete support
Program received signal SIGINT, Interrupt.
0xfffffff8 in ?? ()
(gdb) load
Loading section .note.gnu.build-id, size 0x24 lma 0x0
Loading section .text.head, size 0x3e0 lma 0xc0008000
Loading section .init, size 0x1bc20 lma 0xc00083e0
Loading section .text, size 0x335f5a lma 0xc0024000
Loading section __param, size 0x1000 lma 0xc035a000
Loading section .data, size 0x1d1e8 lma 0xc035c000
Start address 0xc0008000, load size 3604838
Transfer rate: 26 KB/sec, 16021 bytes/write.
Warning: the current language does not match this frame.
(gdb) cont
Continuing.
unhandled core state
Program received signal SIGINT, Interrupt.
stext () at arch/arm/kernel/head.S:80
80 msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
(gdb) n
unhandled core state
unhandled core state
unhandled core state
Also in OPENOCD console I have this error “Error: 2154 201947 armv4_5.c:388 arm_set_cpsr(): Jazelle state handling is BROKEN!”
Can you help me to understand what is wrong with my sessions?
P.S: I am able to load at91bootstrap.elf file correctly with my jtag adapter , load and debug from gdb session , I think my problem with vmlinux is about memory_map support of gdb , but if you see smt wrong with my commands please tell me.
Thanks.