[Top][All Lists]

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

Re: [lwip-users] How to add lwIP support for nios2 processor.

From: Andreas Bachmann
Subject: Re: [lwip-users] How to add lwIP support for nios2 processor.
Date: Wed, 07 May 2014 15:20:40 +0200
User-agent: Roundcube Webmail/0.9.5

Hi Ritesh,

First, there is a difference between Quartus resp. Nios II Embedded Design Suite (EDS) [= Eclipse + GNU Tools] and the Nios II processor. Altera Quartus resp. EDS is now at version 13.1. The release date of version 9.1 was on November 2009 (long time ago) and version 9.0 even longer. But the Nios II processor doesn't change in that time.

I found some lwIP-drivers for Nios II somewhere on the net but don't find the source now. Attached are links to own examples: http://bachi.te-clan.ch/lwip_nios2_example.tar.gz

The example uses no operations system (NO_SYS=1) and polls the Ethernet driver in the mainloop. The difference between OS and NON-OS is described here: http://lwip.wikia.com/wiki/LwIP_with_or_without_an_operating_system The example itself is not compileable (among other things, because I can't release the VHDL part) but shows how to used lwip with Nios II.

Furthermore, you have to know what VHDL/Verilog part is used: a self-implemented core, the Triple-Speed-Ethernet (TSE) MAC from Altera, a different IP-core or an external MAC-PHY-chip (ex. LAN91C11). This is important for the Ethernet driver.

In principle you have two directories:
- the common lwip-source that doesn't have to be changed
- the lwip-port (only header-files) with the Ethernet-driver, that has to be implemented

The lwip-port (app/include/lwip-enet/lwipopts.h, app/include/lwip-enet/arch/*) is already ported to Nios II (but with NO_SYS=1). In app/include/lwip-enet/lwipopts.h there is a define NO_SYS (= no operating system) that can be set to NO_SYS=1 (= no OS) or NO_SYS=0 (= there is an OS). If you want to use MicroC/OS-II, set NO_SYS=0 and follow the notes here: http://lwip.wikia.com/wiki/Porting_for_an_OS There is also an Altera document from 2004: Using Lightweight IP with the Nios II Processor Tutorial (http://www.altera.co.jp/literature/tt/tt_nios2_lwip_tutorial.pdf), but that is really outdated. If you're using the TSE MAC from Altera, you could extract some code from the lwip-1.3.2 archive here: http://lwip.wikia.com/wiki/Available_device_drivers

There is no "extract and run" example.



Am 03.05.2014 12:33, schrieb Ritesh Prajapati:
Hi All,

    I want to add support of lwIP Protocol for Altera Nios 9.0 or
later version. I have read some documents regarding lwIP support and
found that lwIP support has been replaced by inter-niche stack from
Altera Nios 6.1 or later version.

    Does any one have idea or any information about how to port lwip
protocol for Nios 9.0 or later version?

    Please let me know your valuable feedback on this ASAP.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]