Article ID: 000076146 Content Type: Product Information & Documentation Last Reviewed: 09/11/2012

How to implement ALTERA Edition NicheStack Auto IP function

Environment

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Description

This solution will guide you through implementing the AUTO IP function in NicheStack TCP/IP Stack - Nios® II Edition

 

1) Generate System Library: Using the Nios II IDE software environment, create a system library which includes MicroC/OS-II and NicheStack.

 

2) Modify your ipport.h header file:  From the Nios II IDE, open your system library folder and find the Debug\system_description directory.  Open the file called ipport.h and add the following #defines:

 

#define USE_AUTOIP      1

#define USE_UPNP        1

#define INICHE_TIMERS   1

 

These will enable the auto-ip functions in NicheStack.

 

3) Rebuild your system library (i.e. right-click and select rebuild). Note: Do not select "Clean All" as this may overwrite your ipport.h file!

 

4) Modify your application:  If your application is based off of the system_socket_server or webserver templates, it will include a file named network_utilities.c. Back up your version of this file and replace it with the following network_utilities.c file.

 

5) Build your application and test:  Rebuild your application and download it to the board.  Your board will try to use DHCP first, and when it times out it will attempt Auto IP.

 

For more details about the auto ip function, please refer to C:\altera\<VERSION>\nios2eds\components\altera_iniche\UCOSII\src\autoip4\readme.txt

Related Products

This article applies to 1 products

Intel® Programmable Devices