[okl4-developer] Debugging tips for a new platform
Joshua Root
jmr at cse.unsw.edu.au
Thu Jun 19 16:03:30 EST 2008
Geoffrey Lee wrote:
> On Thu, Jun 19, 2008 at 02:36:51PM +1000, Joshua Root wrote:
>> Geoffrey Lee wrote:
>>> On Thu, Jun 19, 2008 at 02:09:16PM +1000, Joshua Root wrote:
>>>>> I just took a brief look at the Skyeye source code and it seems there
>>>>> is support for running in big endian mode. If you specify the -e
>>>>> parameter it infers it from the ELF file automatically. You may
>>>>> want to take a look whether it is worth trying out Skyeye, as
>>>>> it can give you instruction traces, and from there, you can narrow
>>>>> down where to look further.
>>>> I actually tried that, but it dies with "elf_checkFile failed: -3".
>>>> Any idea what that means? Getting it running in the simulator would
>>>> certainly be the quickest way forward.
>>> A return -3 means the architecture as read in from the ELF file is not
>>> supported. Perhaps this is a bug in Skyeye?
>> Could be. I'm running the 1.2.1n binary linked from the wiki. I'll try a
>> newer version.
>
>
> Cool, let us know how you go.
Not so good I'm afraid. The binary 1.2.1n runs a gumstix image fine, but
fails on the big-endian nslu2 image. With the same gumstix image,
vanilla 1.2.1 and 1.2.2 output this and nothing more:
% skyeye-1.2.1 -c tools/sim_config/gumstix.skyeye -e build/images/image.sim
arch: arm
cpu info: xscale, pxa25x, 69052100, fffffff0, 2
mach info: name pxa_lubbock, mach_init addr 0x806a130
log_info: Error logon value 2
log_info: log is off.
log_info:log file is /tmp/sk1.cw.log, fd is 0x80e5680
log_info: log start clock 0
log_info: log end clock 4294967295
uart_mod:0, desc_in:, desc_out:
SKYEYE: use xscale mmu ops
exec file "build/images/image.sim"'s format is elf32-little.
load section kernel.text: lma = 0xa0000000 (vma = 0xf0000000) size =
0x00012af0.
load section kernel.rodata: lma = 0xa0012af0 (vma = 0xf0012af0) size =
0x000073b0.
load section kernel.kdebug: lma = 0xa0019ea0 (vma = 0xf0019ea0) size =
0x000043d0.
load section kernel.init: lma = 0xa001e270 (vma = 0xf001e270) size =
0x00001904.
load section kernel.roinit: lma = 0xa001fb74 (vma = 0xf001fb74) size =
0x00000300.
load section kernel.data: lma = 0xa0020000 (vma = 0xf0020000) size =
0x00001618.
load section kernel.kdebug-data: lma = 0xa0021618 (vma = 0xf0021618)
size = 0x00000424.
not load section kernel.bss: addr = 0xf0021a3c size = 0x00003bcc .
load section kernel.kspace: lma = 0xa0028000 (vma = 0xf0028000) size =
0x00004000.
load section kernel.traps: lma = 0xa002c000 (vma = 0xf002c000) size =
0x00001000.
load section kernel.utcb_page: lma = 0xa002d000 (vma = 0xf002d000) size
= 0x00001000.
load section ig_server.text: lma = 0xa0088000 (vma = 0x80000000) size =
0x0000b0a0.
load section ig_server.rodata: lma = 0xa00930a0 (vma = 0x8000b0a0) size
= 0x00000c33.
load section ig_server.data: lma = 0xa0027cd4 (vma = 0x80013cd4) size =
0x00000174.
not load section ig_server.bss: addr = 0x80013e48 size = 0x00000124 .
load section event.text: lma = 0xa0098000 (vma = 0x80100000) size =
0x000045f0.
load section event.rodata: lma = 0xa009c5f0 (vma = 0x801045f0) size =
0x000006ab.
load section event.data: lma = 0xa0095c9c (vma = 0x8010cc9c) size =
0x00000108.
not load section event.bss: addr = 0x8010cda4 size = 0x00000120 .
load section vtimer.text: lma = 0xa00c0000 (vma = 0x80200000) size =
0x00005828.
load section vtimer.rodata: lma = 0xa00c5828 (vma = 0x80205828) size =
0x00000c44.
load section vtimer.data: lma = 0xa009e46c (vma = 0x8020e46c) size =
0x00000244.
not load section vtimer.bss: addr = 0x8020e6b0 size = 0x00000194 .
load section vserial.text: lma = 0xa00e0000 (vma = 0x80300000) size =
0x00005824.
load section vserial.rodata: lma = 0xa00e5828 (vma = 0x80305828) size =
0x00000a54.
load section vserial.data: lma = 0xa00c927c (vma = 0x8030e27c) size =
0x00000434.
not load section vserial.bss: addr = 0x8030e6b0 size = 0x00000420 .
load section vrtc.text: lma = 0xa00e8000 (vma = 0x80400000) size =
0x00005584.
load section vrtc.rodata: lma = 0xa00ed588 (vma = 0x80405588) size =
0x00000cf4.
load section vrtc.data: lma = 0xa00cd27c (vma = 0x8040e27c) size =
0x00000264.
not load section vrtc.bss: addr = 0x8040e4e0 size = 0x00000188 .
load section main_dp_1.text: lma = 0xa0510000 (vma = 0x80500000) size =
0x00005a18.
load section main_dp_1.rodata: lma = 0xa0515a18 (vma = 0x80505a18) size
= 0x00000883.
load section main_dp_1.data: lma = 0xa00ef29c (vma = 0x8050e29c) size =
0x0000010c.
not load section main_dp_1.bss: addr = 0x8050e3a8 size = 0x00000108 .
load section bootinfo: lma = 0xa0530000 (vma = 0x80074000) size =
0x00005000.
start addr is set to 0xa0000000 by exec file.
1.2.3 through 1.2.5 do this:
% skyeye-1.2.5 -c tools/sim_config/gumstix.skyeye -e build/images/image.sim
Your elf file is little endian.
arch: arm
cpu info: xscale, pxa25x, 69052100, fffffff0, 2
mach info: name pxa_lubbock, mach_init addr 0x8066730
log_info: Error logon value 2
log_info: log is off.
log_info:log file is /tmp/sk1.cw.log, fd is 0x80f8248
log_info: log start clock 0
log_info: log end clock 18446744073709551615
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use xscale mmu ops
exec file "build/images/image.sim"'s format is elf32-little.
load section kernel.text: lma = 0xa0000000 (vma = 0xf0000000) size =
0x00012af0.
SKYEYE:NumInstrs 0, mem_write_byte addr = f0000000 no bank
I notice that this is the same problem that Gabi was seeing in this post
from February:
<http://lists.okl4.org/pipermail/developer/2008-February/000610.html>
Do you have internal patches that are needed to get this working?
- Josh
More information about the Developer
mailing list