greetings,
I'm newbie and have a s3c2450 based board (arm926ejs), I have a working
compressed kernel image
zImage, this image boots properly via u-boot-1.1.6, however I simply
failed to debug remotely the vmlinux (root directory of linux source tree) via
openocd-0.4.0 with a j-link segger.
is there a good reference on how to properly debug the linux kernel via
openocd/gdb for an arm target on a linux hot machine?
details:
1. let u-boot start the board;
2. I get the u-boot command prompt:
# bdinfo
arch_number = 0x00000648
env_t = 0x00000000
boot_params = 0x30000100
DRAM bank = 0x00000000
-> start = 0x30000000
-> size = 0x04000000
DRAM bank = 0x00000001
-> start = 0x38000000
-> size = 0x04000000
ethaddr = 00:40:5C:26:0A:5B
ip_addr = 192.168.3.5
baudrate = 115200 bps
3. halt the target via openocd/telnet;
4. cd to root directory of linux source code and issue:
gdb vmlinux
GNU gdb (GDB) 6.8.50.20090417
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=arm-none-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb)
5.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0xc3e01874 in ?? ()
0xc3e01874: ldr r3, [r0, #16]
(gdb)
6.
(gdb) set remote hardware-breakpoint-limit 2
(gdb) set remote hardware-watchpoint-limit 2
7.
(gdb) load
Loading section .init, size 0x7b000 lma 0xc0008000
Loading section .text, size 0x2bb618 lma 0xc0083000
Loading section __ksymtab, size 0x4a58 lma 0xc033f000
Loading section __ksymtab_gpl, size 0x1360 lma 0xc0343a58
Loading section __ksymtab_gpl_future, size 0x18 lma 0xc0344db8
Loading section __ksymtab_strings, size 0xcab7 lma 0xc0344dd0
Loading section __param, size 0x654 lma 0xc0351888
Loading section .data, size 0x21538 lma 0xc0352000
Start address 0xc0008000, load size 3582507
Transfer rate: 35 KB/sec, 15922 bytes/write.
(gdb)
8. if I do continue (gdb) c, then I don't see any output on the serial
console (as normally do during zImage booting process!)
where I'm messing up, my bad ;)
openocd daemon configuration is below:
-------------------------------------------------------------
#daemon configuration
telnet_port 4444
gdb_port 3333
#source [find interface/jlink.cfg]
interface jlink
#----------------------------------------
#source [find board/dw-ubi2.cfg]
#source [find target/samsung_s3c2450.cfg]
#----------------------------------------
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME arm926ejs
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
# this defaults to a bigendian
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
# force an error till we get a good number
set _CPUTAPID 0x07926f0f
}
#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f
-expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position
$_TARGETNAME -variant arm926ejs
$_TARGETNAME configure -work-area-virt 0x40002000 -work-area-phys
0x40002000 -work-area-size 0xc000 -work-area-backup 0
jtag_rclk 3000
$_TARGETNAME configure -event "reset-start" {
jtag_rclk 3000
}
# speed up memory downloads
arm7_9 dbgrq enable
arm7_9 fast_memory_access enable
arm7_9 dcc_downloads enable
# Disable MMU, caches, write buffer
#arm mcr 15 0 1 0 0 0x78
#reset configuration, delays needed for giving u-boot chance to
intialize MMU, I-Cache
#jtag_nsrst_delay 100
#jtag_ntrst_delay 100
reset_config trst_and_srst
#-------------------------------------------------------------------------
set _FLASHNAME $_CHIPNAME.flash
nand device $_FLASHNAME s3c2443 $_TARGETNAME
#-------------------------------------------------------------------------
# end of startup configuration, enter run mode (by issuing init)
#-------------------------------------------------------------------------
init
halt
jtag_khz 12000
nand probe 0
gdb_breakpoint_override hard
$_TARGETNAME configure -event "reset-init" {
# Increase JTAG Speed to 6 MHz if RCLK is not supported
reset_nag enable
init
halt
jtag_khz 12000
nand probe 0
gdb_breakpoint_override hard
}
----------------------------------------------------------------------
thanks
ferar
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development