[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] serial driver behaviour,debugging tools for uClinux on MicroBlaze??




Hi all

 It might sound trivial..but I am still stuck at a very 
strange kind of problem...btw..I am getting uClinux(latest dist) to boot on my Insight memec spartan 2e 600 lc board..
(xilinx microblaze softcore processor)


the problem is everything is fine till the kernel prints "freeing unused kernel memory ..." but beyond this i don't get the shell prompt...or even if i get it in some cases..it does not accept any user input...

after several days of experimenting ,i am posting here again 
on the same topic...one major development since my last post being...i analysed the xmbserial.c driver code and defined the SERIAL_DEBUG_OPEN(it was undef'd before)...this is what my kernel boot log looks like after i did that :

...........kernel bootlog start............................

Linux version 2.4.24-uc0 (root@soc3) (gcc version 2.95.3-4 Xilinx EDK 6.1 Build
EDK_G.11) #183 Sat Jul 10 10:34:06 IST 2004
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Console: xmbserial on UARTLite
Kernel command line:
Calibrating delay loop... 3.84 BogoMIPS
Memory: 30912K/32768K available (1010K kernel code, 223K data)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 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: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Microblaze UARTlite serial driver version 1.00
ttyS0 at 0xffff2000 (irq = 1) is a Microblaze UARTlite
Starting kswapd
xgpio #0 at 0xFFFF5000 mapped to 0xFFFF5000
Xilinx GPIO registered
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: 801361C8-80177DC7 [VIRTUAL 801361C8-80177DC7] (RO)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
eth0: Xilinx EMAC #0 at 0xC0000000 mapped to 0xC0000000, irq=3
uclinux[mtd]: RAM probe address=0x801361c8 size=0x42000
uclinux[mtd]: root filesystem index=0
Can't allocate major number 31 for Memory Technology Devices.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 2048)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Freeing unused kernel memory: 48K freed
xmbrs_open ttyS0, count = 0
starting up ttyS0 (irq 1)...
xmbrs_open ttyS0 successful...
xmbrs_close ttyS0, count = 1
Shutting down serial port 0 (irq 1)....
.......................end...............................

my confusion has infact increased now....i have several doubts:

1. its clear that my serial driver is getting initialised/registered correctly(xmbrs_init of the code IIRC)...i want to know how are the characters getting printed before that?...does all this printing happen in the boot code(assembly) or something?..what i want to know is ,is the serial driver used at all for printing characters to the hyperterm (for the kernel boot up part i mean)??

2. from the bootlog its clear that once the execution enters userland..that is after main.c execs to some userland process or sometime around this the serial driver gets invoked because my default output device is a UART...
i suppose xmbrs_open() of xmbserial.c gets called here...
but then...why is the port getting shutdown automatically?.....i mean what is causing it to close down?..i am not clear here..any help would be greatly appreciated...

3. are there any debugging tools available for debugging the kernel image on board....?..i tried using the software debugger from within XPS(EDK 6.1)...but it says ..file format not supported or some such error...
how do we debug the running kernel?..since we are anyway downloading the image.bin file...can't mb-gdb debug this kind of a target file?....

any help in this regard would be immensely helpful....
trying to debug the process so far has been very useful to me in the sense that..i understand the boot process pretty well now...but there seem to some gaps in knowledge which i hope to address with help and direction from the group members...thanks for any guidance..

Regards
V.Anand
(www.tenet.res.in)

___________________________
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/