Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12606 Discussions

uclinux and thriple speed ethernet

Altera_Forum
Honored Contributor II
1,177 Views

Hello. 

Im trying to get ethernet working on my cyclone3 dev board with uClinux. Im using the sof from the udp offload example at nioswiki.com(http://www.nioswiki.com/exampledesigns/nios2udpoffloadexample) and my own kernel. It boots fine: 

 

--- Quote Start ---  

 

uClinux/Nios II 

Built 1 zonelists in Zone order, mobility grouping off. Total pages: 8128 

Kernel command line:  

NR_IRQS:32 

PID hash table entries: 128 (order: 7, 512 bytes) 

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) 

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) 

Memory available: 30000k/2471k RAM, 0k/0k ROM (1661k kernel code, 809k data) 

Calibrating delay loop... 36.86 BogoMIPS (lpj=184320) 

Mount-cache hash table entries: 512 

net_namespace: 264 bytes 

NET: Registered protocol family 16 

init_BSP(): registering device resources 

bio: create slab <bio-0> at 0 

NET: Registered protocol family 2 

IP route cache hash table entries: 1024 (order: 0, 4096 bytes) 

TCP established hash table entries: 1024 (order: 1, 8192 bytes) 

TCP bind hash table entries: 1024 (order: 0, 4096 bytes) 

TCP: Hash tables configured (established 1024 bind 1024) 

TCP reno registered 

NET: Registered protocol family 1 

io scheduler noop registered 

io scheduler deadline registered (default) 

ttyJ0 at MMIO 0x4000678 (irq = 3) is a Altera JTAG UART 

console [ttyJ0] enabled 

eth0: atse.c: v1.1, june 3, 2008 by joseph (camel) chen <joe4camel@gmail.com>  

eth0: atse.c: modified version by eintisy chuang <eintisy.chuang@gfec.com.tw>  

eth0: altera tripple speed, ether hw addr 00:07:ed:0d:09:19, marvell 88e1111 phy 

TCP cubic registered 

NET: Registered protocol family 17 

RPC: Registered udp transport module. 

RPC: Registered tcp transport module. 

Freeing unused kernel memory: 580k freed (0x81d8000 - 0x8268000) 

Shell invoked to run file: /etc/rc 

Command: hostname uClinux 

Command: mount -t proc proc /proc -o noexec,nosuid,nodev 

Command: mount -t sysfs sysfs /sys -o noexec,nosuid,nodev 

Command: mount -t devpts devpts /dev/pts -o noexec,nosuid 

Command: mount -t usbfs none /proc/bus/usb 

mount: mounting none on /proc/bus/usb failed: No such file or directory 

Command: mkdir /var/tmp 

Command: mkdir /var/log 

Command: mkdir /var/run 

Command: mkdir /var/lock 

Command: mkdir /var/empty 

Command: ifconfig lo 127.0.0.1 

Command: route add -net 127.0.0.0 netmask 255.0.0.0 lo 

Command: cat /etc/motd 

 

--- Quote End ---  

From this, it seems that the device drivers works. 

 

I run ifconfig eth0 <addr> and get: 

 

--- Quote Start ---  

eth0 up, link speed 100, full duplex, eth hw addr 00:07:ed:0d:09:19 

--- Quote End ---  

Still seems ok, right? 

 

I have my computer connected to the same switch as the board, and in the same ip range. Now, when i try to ping my computer I get no response but the RX and TX leds on the board lights up. Same thing when I ping the board from the computer; no response but RX-led on board lights up. I also have a dhcp-server running on the computer, but the board cant connect. Apparently, it's incoming traffic to the board that's the problem. 

 

Is it possible that I've configured the kernel wrong? Is there a working kernel.config with ethernet available for this board somewhere?
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
430 Views

You can try using wireshark on your pc it will tell you if there are any packets from the nios seen by the PC 

 

Try directly connecting the PC to the eval board using a cross over cable it might be the switch
0 Kudos
Altera_Forum
Honored Contributor II
430 Views

andurs, 

Did you resolve this issue? I am facing a similar problem.  

After booting linux I try running dhcpcd and have no luck with that. 

>dhcpcd eth0 

ATSE: Waiting on PHY link ...... 

eth0 up, link speed 100, full duplex, eth hw addr 00:07:ed:0d:09:19 

 

After this nios2_terminal is hanging.  

 

Any information would be great! 

thanks and regards, 

priya
0 Kudos
Altera_Forum
Honored Contributor II
430 Views

Have you guys tried Altera-TSE(SLS's TSE) rather than atse.c??? 

I think the example project for the C3 devkit is using Altera-TSE. 

Change the menuconfig setting to use this Altera-TSE(SLS). 

Also, if you still see the receive LED blink, but not getting packet right, then check the SG-DMA part, especially, IRQ and descriptor is set correctly.  

 

Oh, one more. Not sure which Quartus version you guys are using, but example design was compiled on Q9.0 I believe. You might want to try on 9.0.
0 Kudos
Altera_Forum
Honored Contributor II
430 Views

thanks nekojiru, i think it's some problem with my hw design. I got another example from SLS corp and that seems to work.  

thanks, 

priya
0 Kudos
Reply