- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.Link Copied
18 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by scut_ak@Apr 26 2006, 07:19 PM 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.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14701)
--- quote end ---
--- Quote End --- I found both uart_0 and uart_usb in your ptf. 1. since you have jtag connector on your board for download, use jtag uart as a first test to make sure the kernel start up. 2. use only minimal ptf, with only one uart_0 . use zImage instead of vmlinux, becaue zImage will print a message driectly to the uart port.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,Hippo
Thank you for your reply. I look at the build script and found that there is no buildroot-20060320.tar.bz2 on the web site. so I download the buildroot-20060322.tar.bz2 busybox-20060322.tar.bz2 and uClibc-20060322.tar.bz2 instead. Does it matter?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The image I produce is so large, It is about 6.5M. Is that ok?
what is your kernel size?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by scut_ak@Apr 26 2006, 10:21 PM the image i produce is so large, it is about 6.5m. is that ok?
what is your kernel size?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14714)
--- quote end ---
--- Quote End --- Don't worry, my vmlinux is 12M. It is big because it has all the debug symbols. You can check the zImage . It is compressed and has fewer symbols.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by scut_ak@Apr 26 2006, 09:48 PM hi ,hippo
thank you for your reply.
i look at the build script and found that there is no buildroot-20060320.tar.bz2 on the web site. so i download the buildroot-20060322.tar.bz2 busybox-20060322.tar.bz2 and uclibc-20060322.tar.bz2 instead.
does it matter?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14712)
--- quote end ---
--- Quote End --- I remember some people used 20060322. It might work, too. But this is really a problem, when I use the snapshot in build script. It will last for only one month. I should find some place to hold the old snapshots, and some binary distro ? .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use another project .ptf, this time I use only one uart and the baud rate is 115200, Does it ok?
But It still does not work, I am nearly mad.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 12:49 PM i use another project .ptf, this time i use only one uart and the baud rate is 115200, does it ok?
but it still does not work, i am nearly mad.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14735)
--- quote end ---
--- Quote End --- don't give up. use jtag uart and zImage first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,Hippo
Thank you very much for your replay. Today I use FS2 associated with the nios2 IDE to debug my image ,First I use the command "nios2-elf-objcopy -O srec vmlinux vmlinux.srec" in nios SDK shell to convert the elf to srec format,and doanload the srec image to my Cyclone board in FS2 console using the commands "load srec vmlinux.srec" and "go" then there are some message showing in the console as follow: 49> reset User reset. 00800000 0x0001703a wrctl status, r0 50> set pc 0x0 0 51> load srec vmlinux.srec 1095464 52> go Emulation started. Software breakpoint. 00A00094 0x003da03a break 53> ls ./: cfi_flash_0.flash generated_app.sh hello_world_0.elf hello_world_0.srec makefile obj/ subdir.mk vmlinux.elf vmlinux.srec 54> pc 0x00A00094 55> The base address of my sdram is 0x0, I test my hello world application as above, and it work well. I support that the uclinux is also a application,but much bigger than our normal application. I do not familiar with the nios instruction sets,so I do not know what to do now, should I study the nios instruction set ? My e-mail is : scut_ak@163.com How can i touch you by e-mail and send my detailed info about my situation. Thank you for your work done for us.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 03:34 PM hi,hippo
thank you very much for your replay.
today i use fs2 associated with the nios2 ide to debug my image ,first i use the command "nios2-elf-objcopy -o srec vmlinux vmlinux.srec" in nios sdk shell to convert the elf to srec format,and doanload the srec image to my cyclone board in fs2 console using the commands "load srec vmlinux.srec" and "go" then there are some message showing in the console as follow:
49> reset
user reset.
00800000 0x0001703a wrctl status, r0
50> set pc 0x0
0
51> load srec vmlinux.srec
1095464
52> go
emulation started.
software breakpoint.
00a00094 0x003da03a break
53> ls
./:
cfi_flash_0.flash generated_app.sh hello_world_0.elf hello_world_0.srec
makefile obj/ subdir.mk vmlinux.elf
vmlinux.srec
54> pc
0x00a00094
55>
the base address of my sdram is 0x0, i test my hello world application as above, and it work well. i support that the uclinux is also a application,but much bigger than our normal application.
i do not familiar with the nios instruction sets,so i do not know what to do now, should i study the nios instruction set ?
my e-mail is : scut_ak@163.com how can i touch you by e-mail and send my detailed info about my situation.
thank you for your work done for us.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14744)
--- quote end ---
--- Quote End --- Sorry, I don't use IDE or the debugger. When I worked out my first uClinux boot, I didn't have any dev board and I didn't use jtag debugger /terminal. I used only serial uart and the download tools of my own custom board. It did take some time because I was a newbie, too. Since you have the jtag tools, you should really try out jtag uart and zImage. "nios2-download -g zImage" and then "nios2-terminal" , you should get the "Uncompressing Linux..." message right after boot. it is direct io to uart port without device driver layer. It did not enter linux yet. It is a good point to verify the board is working. It is easier to work with nios2 SDK shell than the IDE. You can just post your result here, so that others may share the experience. I did give some ones my e-mail, but I found it not really helpful. I will poll the forum when I hare a short break. It won't take long to get my reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,Hippo
Thank you for your suggestion. I will post my result here. I am sorry,I made a mistake. I use vmlinux as my image, it should be zImage. I run the command "nios2-download -g zImage ", then in my uart port there is a message Uncompressing Linux... Ok, booting the kernel. Then it come to a stop. My custom board use Cyclone (EP1C6), should I choose the Altera Cyclone board in the "Processor type and features" when menuconfig the kernel?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 (hgjw@localhost.localdomain) (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?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 09:51 PM 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 (hgjw@localhost.localdomain) (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 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 11:33 PM 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?
<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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by scut_ak@Apr 27 2006, 11:33 PM 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?
<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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page