sheevaplug debugging with openocd

hi together,

if i try to debug my sheevaplug i get following issues

minicom

#########

U-Boot 2013.10 (Dec 29 2013 - 12:15:18)

Marvell-Sheevaplug

SoC: Kirkwood 88F6281_A1

DRAM: 512 MiB

WARNING: Caches not enabled

NAND: 512 MiB

In: serial

Out: serial

Err: serial

Net: egiga0 [PRIME]

88E1116 Initialized on egiga0

Hit any key to stop autoboot: 0

Marvell>>

U-Boot 2013.10 (Dec 29 2013 - 12:15:18)

Marvell-Sheevaplug

SoC: Kirkwood 88F6281_A1

DRAM: 512 MiB

WARNING: Caches not enabled

NAND: 512 MiB

In: serial

Out: serial

Err: serial

Net: egiga0 [PRIME]

88E1116 Initialized on egiga0

Hit any key to stop autoboot: 0

Marvell>>

openocd

#######

root@debian:/home/tux/aaa/arm/openocd/openocd# openocd

Open On-Chip Debugger 0.5.0 (2011-08-11-06:56)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.berlios.de/doc/doxygen/bugs.html

Info : only one transport option; autoselect ‘jtag’

2000 kHz

trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain

adapter_nsrst_delay: 200

jtag_ntrst_delay: 200

dcc downloads are enabled

sheevaplug_load_uboot

Info : clock speed 2000 kHz

Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)

Info : Embedded ICE version 0

Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit

Info : accepting ‘telnet’ connection from 4444

Info : Halt timed out, wake up GDB.

Error: timed out while waiting for target halted

Runtime Error: openocd.cfg:34:

in procedure ‘sheevaplug_init’

in procedure ‘wait_halt’ called at file “openocd.cfg”, line 34

Warn : target not halted

in procedure ‘load_image’

target state: halted

target halted in ARM state due to debug-request, current mode: Supervisor

cpsr: 0x000000d3 pc: 0xffff0000

MMU: disabled, D-Cache: disabled, I-Cache: disabled

5825772 bytes written at address 0xc0008000

downloaded 5825772 bytes in 58.729290s (96.872 KiB/s)

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Error: Couldn’t calculate PC of next instruction, current opcode was 0x00000000

in procedure ‘step’

Info : accepting ‘gdb’ connection from 3333

Warn : acknowledgment received, but no packet pending

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0007ffc, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0007ffc, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0007ffc, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0007ffc, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Warn : memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

netcat

#######

root@debian:/home/tux/aaa/arm/openocd/openocd# netcat localhost 4444

???Open On-Chip Debugger

sheevaplug_init

sheevaplug_init

Halt timed out, wake up GDB.

timed out while waiting for target halted

Runtime Error: openocd.cfg:34:

in procedure ‘sheevaplug_init’

in procedure ‘wait_halt’ called at file “openocd.cfg”, line 34

load_image /home/tux/aaa/arm/she/linux-2.6.39/vmlinux

load_image /home/tux/aaa/arm/she/linux-2.6.39/vmlinux

target not halted

in procedure ‘load_image’

sheevaplug_init

sheevaplug_init

target state: halted

target halted in ARM state due to debug-request, current mode: Supervisor

cpsr: 0x000000d3 pc: 0xffff0000

MMU: disabled, D-Cache: disabled, I-Cache: disabled

load_image /home/tux/aaa/arm/she/linux-2.6.39/vmlinux

load_image /home/tux/aaa/arm/she/linux-2.6.39/vmlinux

5825772 bytes written at address 0xc0008000

downloaded 5825772 bytes in 58.729290s (96.872 KiB/s)

step 0xc0008000

step 0xc0008000

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Couldn’t calculate PC of next instruction, current opcode was 0x00000000

in procedure ‘step’

accepting ‘gdb’ connection from 3333

acknowledgment received, but no packet pending

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0007ffc, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0007ffc, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0007ffc, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0007ffc, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

gdb

root@debian:/home/tux/aaa/arm/openocd/openocd# . …/…/…/arm-env.sh

root@debian:/home/tux/aaa/arm/openocd/openocd# arm-poky-linux-gnueabi-gdb /home/tux/aaa/arm/she/linux-2.6.39/vmlinux

GNU gdb (GDB) 7.5

Copyright (C) 2012 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-linux --target=arm-poky-linux-gnueabi”.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>…

Reading symbols from /home/tux/aaa/arm/she/linux-2.6.39/vmlinux…done.

(gdb) target remote localhost:3333

Remote debugging using localhost:3333

stext () at arch/arm/kernel/head.S:76

76 setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode

(gdb) break start_kernel

Breakpoint 1 at 0xc00085f8: file init/main.c, line 457.

(gdb) c

Continuing.

Warning:

Cannot insert breakpoint 1.

Error accessing memory address 0xc00085f8: Unknown error 4294967295.

(gdb) hb start_kernel

Note: breakpoint 1 also set at pc 0xc00085f8.

Hardware assisted breakpoint 2 at 0xc00085f8: file init/main.c, line 457.

(gdb) c

Continuing.

Warning:

Cannot insert breakpoint 1.

Error accessing memory address 0xc00085f8: Unknown error 4294967295.

(gdb)

error-issue begins with

step 0xc0008000

step 0xc0008000

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Couldn’t calculate PC of next instruction, current opcode was 0x00000000

and continues with

(gdb) break start_kernel

Breakpoint 1 at 0xc00085f8: file init/main.c, line 457.

(gdb) c

Continuing.

Warning:

Cannot insert breakpoint 1.

Error accessing memory address 0xc00085f8: Unknown error 4294967295.

(gdb) hb start_kernel

Note: breakpoint 1 also set at pc 0xc00085f8.

Hardware assisted breakpoint 2 at 0xc00085f8: file init/main.c, line 457.

(gdb) c

Continuing.

Warning:

Cannot insert breakpoint 1.

Error accessing memory address 0xc00085f8: Unknown error 4294967295.

Has somebody some idea ?

thanks for ideas

the same procedure with u-boot works very well

root@debian:/home/tux/aaa/arm/openocd/openocd# openocd

Open On-Chip Debugger 0.5.0 (2011-08-11-06:56)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.berlios.de/doc/doxygen/bugs.html

Info : only one transport option; autoselect ‘jtag’

2000 kHz

trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain

adapter_nsrst_delay: 200

jtag_ntrst_delay: 200

dcc downloads are enabled

Error: arguments must be: <target_id> <NAND_address>

Error: ‘orion’ driver rejected nand flash

sheevaplug_load_uboot

Info : clock speed 2000 kHz

Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)

Info : Embedded ICE version 0

Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit

Info : accepting ‘telnet’ connection from 4444

invalid command name “shevaplug_init”

target state: halted

target halted in ARM state due to debug-request, current mode: Supervisor

cpsr: 0x000000d3 pc: 0xffff0000

MMU: disabled, D-Cache: disabled, I-Cache: disabled

Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)

target state: halted

target halted in ARM state due to debug-request, current mode: Supervisor

cpsr: 0x000000d3 pc: 0xffff0000

MMU: disabled, D-Cache: disabled, I-Cache: disabled

Info : accepting ‘gdb’ connection from 3333

Warn : acknowledgment received, but no packet pending

root@debian:/home/tux/aaa/arm/openocd/openocd# telnet localhost 4444

Trying ::1…

Trying 127.0.0.1…

Connected to localhost.

Escape character is ‘^]’.

Open On-Chip Debugger

shevaplug_init

invalid command name “shevaplug_init”

sheevaplug_init

target state: halted

target halted in ARM state due to debug-request, current mode: Supervisor

cpsr: 0x000000d3 pc: 0xffff0000

MMU: disabled, D-Cache: disabled, I-Cache: disabled

reset

JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)

sheevaplug_init

target state: halted

target halted in ARM state due to debug-request, current mode: Supervisor

cpsr: 0x000000d3 pc: 0xffff0000

MMU: disabled, D-Cache: disabled, I-Cache: disabled

accepting ‘gdb’ connection from 3333

acknowledgment received, but no packet pending

root@debian:/home/tux/aaa/arm/openocd/openocd# . …/…/…/arm-env.sh

root@debian:/home/tux/aaa/arm/openocd/openocd# arm-poky-linux-gnueabi-gdb /home/tux/aaa/arm/she/u-boot-2013.10/u-boot

GNU gdb (GDB) 7.5

Copyright (C) 2012 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-linux --target=arm-poky-linux-gnueabi”.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>…

Reading symbols from /home/tux/aaa/arm/she/u-boot-2013.10/u-boot…done.

(gdb)

(gdb) target remote localhost:3333

Remote debugging using localhost:3333

0xffff0000 in ?? ()

(gdb) load

Loading section .text, size 0x42d8c lma 0x600000

Loading section .rodata, size 0xf059 lma 0x642d90

Loading section .hash, size 0x2c lma 0x651dec

Loading section .ARM.extab, size 0xc lma 0x651e18

Loading section .data, size 0x1f36 lma 0x651e24

Loading section .got.plt, size 0xc lma 0x653d5c

Loading section .u_boot_list, size 0x6c0 lma 0x653d68

Loading section .rel.dyn, size 0x7aa0 lma 0x654428

Start address 0x600000, load size 376511

Transfer rate: 39 KB/sec, 13446 bytes/write.

(gdb) break kw_winctrl_calcsize

Breakpoint 1 at 0x600344: file cpu.c, line 68.

(gdb) c

Continuing.

Program received signal SIGINT, Interrupt.

kw_winctrl_calcsize (sizeval=sizeval@entry=268435456) at cpu.c:68

68 unsigned int j = 0;

(gdb)

Now i ask me what is the difference ??

No idea for this behavior

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

memory read caused data abort (address: 0xc0008000, size: 0x4, count: 0x1)

Couldn’t calculate PC of next instruction, current opcode was 0x00000000

No solution :frowning: