Forum Discussion
Altera_Forum
Honored Contributor
20 years agonothing out to uart,help me
hi,Hippo
you have to select nios serial in kernel config CODE [*] Nios serial support [*] Support for console on Nios UART I have select it ,but still it does not work foe me.why? have you checked my ptf? I do not know whether there is some mistake.18 Replies
- Altera_Forum
Honored Contributor
There are also a long pause between the message "Uncompressing Linux..." and "Ok, booting the kernel.", about half a minute.
Was this ok? My system run at 50Mhz(input is 25MHz). In the menuconfig I only change the 1 Device Drivers ---> Character devices ---> Serial drivers ---> disable the JTAG UART option and enable UART option 2 Processor type and features-->(0x00500000) Link address offset for booting 3 Processor type and features--> I choose the Altera Cyclone Board my sdram is at 0x0 and the size is 8MByte (16Bit width) - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 07:59 PM there are also a long pause between the message "uncompressing linux..." and "ok, booting the kernel.", about half a minute.was this ok? my system run at 50mhz(input is 25mhz).
in the menuconfig i only change the
1 device drivers ---> character devices ---> serial drivers --->
disable the jtag uart option and enable uart option
2 processor type and features-->(0x00500000) link address offset for booting
3 processor type and features--> i choose the altera cyclone board
my sdram is at 0x0 and the size is 8mbyte (16bit width)
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14751)
--- quote end ---
--- Quote End --- 1. you should have [*] Nios serial support [*] Support for console on Nios UART 2. boot link offset is correct 3. no need to change, because you are using a custom board. You are using "tiny core", without icache and dcache. without hw mul. It is very slow. It takes about 7-10 clocks for each instruction. You should use "small" or "fast" core, with at least 512Byte icache. dcache is optional. Hw mul is recommanded. If you don't use hw mul, you have to do 1. enable multilib in toolchain option of buildroot menuconfig 2. add "-mno-hw-mul" cflags to busybox menuconfig 3. processor --> Nios II Hardware Multiply Support (None) to kernel config From your result, the zImage loader is working. and uart direct io is working. The problem maybe in hw mul .
- Altera_Forum
Honored Contributor
Hi, Hippo
here is the output from my uart(115200), then It come to a stop here,why? Uncompressing Linux... Ok, booting the kernel. Linux version 2.6.11-uc0 ([email protected]) (gcc version 3.4.6)# 2 Thu Apr 27 21:20:29 CST 2006 uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. Built 1 zonelists Kernel command line: PID hash table entries: 64 (order: 6, 1024 bytes) i compare it with yours, and find it is a little different with yours PID hash table entries: 64 (order: 6, 1024 bytes) yours are PID hash table entries: 512 (order: 9, 8192 bytes) why? Have I make some other mistakes? - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 09:51 PM hi, hippohere is the output from my uart(115200), then it come to a stop here,why?
uncompressing linux... ok, booting the kernel.
linux version 2.6.11-uc0 ([email protected]) (gcc version 3.4.6)# 2 thu apr 27 21:20:29 cst 2006
uclinux/nios ii
altera nios ii support © 2004 microtronix datacom ltd.
built 1 zonelists
kernel command line:
pid hash table entries: 64 (order: 6, 1024 bytes)
i compare it with yours, and find it is a little different with yours
pid hash table entries: 64 (order: 6, 1024 bytes)
yours are
pid hash table entries: 512 (order: 9, 8192 bytes)
why? have i make some other mistakes?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14758)
--- quote end ---
--- Quote End --- It sould not be a problem. I have 64MB on board, while you have only 8MB. It may take some time to uncompress the initramfs. Did you use small core ? turn on icache and hw mul ? You may have to trace and debug linux-2.6.x/init/main.c .
- Altera_Forum
Honored Contributor
Hi,Hippo
I use nios IDE to build my linux image, I disable the mul and jatg-uart then the output is the same as I build the image in linux environment The output is as follow: Linux version 2.6.11-uc0 (Administrator@MICROSOF-0DA828) (gcc version 3.4.1 (Altera Nios II 5.1 b73))# 1 Thu Apr 27 23:04:07 2006 uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. Built 1 zonelists Kernel command line: root=/dev/mtdblock0 ro PID hash table entries: 64 (order: 6, 1024 bytes) why? - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 11:33 PM hi,hippoi use nios ide to build my linux image, i disable the mul and jatg-uart
then the output is the same as i build the image in linux environment
the output is as follow:
linux version 2.6.11-uc0 (administrator@microsof-0da828) (gcc version 3.4.1 (altera nios ii 5.1 b73))# 1 thu apr 27 23:04:07 2006
uclinux/nios ii
altera nios ii support © 2004 microtronix datacom ltd.
built 1 zonelists
kernel command line: root=/dev/mtdblock0 ro
pid hash table entries: 64 (order: 6, 1024 bytes)
why?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14767)
--- quote end ---
--- Quote End --- You should check your sdram clock timing. Simple sdram test program may not detect the problem. Many people have problems on the sdram clock. Search the forum.
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 11:33 PM hi,hippoi use nios ide to build my linux image, i disable the mul and jatg-uart
then the output is the same as i build the image in linux environment
the output is as follow:
linux version 2.6.11-uc0 (administrator@microsof-0da828) (gcc version 3.4.1 (altera nios ii 5.1 b73))# 1 thu apr 27 23:04:07 2006
uclinux/nios ii
altera nios ii support © 2004 microtronix datacom ltd.
built 1 zonelists
kernel command line: root=/dev/mtdblock0 ro
pid hash table entries: 64 (order: 6, 1024 bytes)
why?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14767)
--- quote end ---
--- Quote End --- I think this is the problem. (I made the same mistake before, too) You are using nios2 v4.2, and the execption address, ie, interrupt entry, is in onchip memory. Nios2 uClinux assume interrupt entry at program memory, ie, sdram. So when interrupt came, and it stuck. You should update to nios2 v5.1 and quartus2 v5.1 sp2. Setup the execption address, to sdram.
- Altera_Forum
Honored Contributor
Hi,Hippo
Thank you for your help, I have solved my problem now and successfully ported the uclinux to my Cyclone Board. Thank you for advice and your courage which guide me to my final success.,and also respect you for your excellent work done for all of us here.