[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] GDB with uClinux
Hi John,
I expanded the tarball in the user/gdbserver dir, updated entry.S and ptrace.c from CVS and put the mb-gdb-user next to mb-gdb.
I rebuilt everything and loaded the ./images/pImage.romfs onto the target as usual and booted it. It comes up like this:
## Booting image at 80800000 ...
Image Name: Linux-2.4.26-uc0-GEIS
Created: 2005-03-24 20:55:20 UTC
Image Type: Microblaze uClinux Kernel Image (gzip compressed)
Data Size: 1092223 Bytes = 1 MB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Linux version 2.4.26-uc0-GEIS (root@WaltsLinuxBox) (gcc version 2.95.3-4 Xilinx
EDK 6.2.1 Build EDK_Gm.12.3) #4 Thu Mar 24 12:54:35 PST 2005
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Console: xmbserial on UART (Lite)
Kernel command line:
Calibrating delay loop... 32.87 BogoMIPS
Memory: 16MB = 16MB total
Memory: 13340KB available (1068K code, 1791K data, 52K init)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
POSIX conformance testing by UNIFIX
SYSVIPC: msg queue size=16
kernel BUG at page_alloc.c:158!
I don't know why I'm getting the kernel BUG. I enabled full symbolic debugging from the menuconfig->kernel hacking area, assuming it would be useful for gdb. However, I then built and ran it without the symbolic debugging enabled and get this:
GE> bootm
## Booting image at 80800000 ...
Image Name: Linux-2.4.26-uc0-GEIS
Created: 2005-03-24 21:11:19 UTC
Image Type: Microblaze uClinux Kernel Image (gzip compressed)
Data Size: 1092725 Bytes = 1 MB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Linux version 2.4.26-uc0-GEIS (root@WaltsLinuxBox) (gcc version 2.95.3-4 Xilinx
EDK 6.2.1 Build EDK_Gm.12.3) #5 Thu Mar 24 13:10:24 PST 2005
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Console: xmbserial on UART (Lite)
Kernel command line:
Calibrating delay loop... 32.87 BogoMIPS
Memory: 16MB = 16MB total
Memory: 13340KB available (1068K code, 1791K data, 52K init)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
POSIX conformance testing by UNIFIX
SYSVIPC: msg queue size=16
U-Boot 1.1.2 (Jan 20 2005 - 09:13:08)
Microblaze Reset Status: External Hard
Microblaze MSR Status: I-Cache Enable
CPU: Microblaze at 66.666 MHz
Board: GE Security, NX590 Core, Rev: 0.05
SDRAM: 16 MB
Mips: Calibrating delay loop... 32.57 BogoMIPS
WD: Initializing ... done
FLASH: 4 MB
Hit any key to stop autoboot: 0
Looks like it hit the kernel bug and performed a reset. Any ideas on what could be wrong?
tia,
Walt
-----Original Message-----
From: owner-microblaze-uclinux@itee.uq.edu.au
[mailto:owner-microblaze-uclinux@itee.uq.edu.au]On Behalf Of John
Williams
Sent: Wednesday, March 23, 2005 6:59 PM
To: microblaze-uclinux@itee.uq.edu.au
Subject: Re: [microblaze-uclinux] GDB with uClinux
Hi Walt,
OK more progress - I foud na crucial note from about 12 months ago on
the subject - turns out we do still need a custom mb-gdb (at least for
now). Attached are latest versions of gdbserver archive, and also a
linux binary for the tweaked mb-gdb - I call it mb-gdb-user. Put it
somewhere in the path, potentially along side mb-gdb.
Also freshen your arch/microblaze/kernel/entry.S and ptrace.c.
This seems to work reasonably well, multiple breakpoints and single
stepping are all fine - the only unresolved issue now is that when
gdbserver terminates on the microblaze, it kills the shell in which it
was run. This is annoying, but not a showstopper. Please test it out
and let me know if it works for you.
Usage is as follows:
on the microblaze:
$ gdbserver host:1234 /bin/myapplication
on the host
$ mb-gdb-user myapplication.gdb
% target remote microblaze-ip-address:1234
% break, step, run, etc etc etc
The .gdb image that is produced in the application link process, is the
one you load in mb-gdb-user
Regards,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/