Using the NicheStack TCP/IP Stack - Nios II Edition Tutorial

ID 683574
Date 10/04/2021
Document Table of Contents

1.4.2. Software Files

The NicheStack tutorial software files are available as an example within the EDS and do not have to be separately downloaded.

The software files constitute the Nios II Simple Socket Server application for this tutorial:

  • alt_error_handler.c—Contains three error handlers, one each for the Nios II Simple Socket Server, NicheStack TCP/IP Stack, and MicroC/OS-II.
  • alt_error_handler.h—Contains definitions and function prototypes for the three software component-specific error handlers.
  • iniche_init.c—Defines main(), which initializes MicroC/OS-II and NicheStack TCP/IP Stack, processes the MAC and IP addresses, contains the PHY management tasks, and defines function prototypes.
  • led.c—Contains the LED management tasks.
  • simple_socket_server.c—Defines the tasks and functions that use the NicheStack TCP/IP Stack sockets interface, and creates all the MicroC/OS-II resources.
  • simple_socket_server.h—Defines the task prototypes, task priorities, and other MicroC/OS-II resources used in this tutorial.
  • tse_my_system.c—Defines the global structure of type "alt_tse_system_info", named "tse_mac_device" which describes the TSE configuration
  • network_utilities.c—Contains MAC address and IP address routines to manage addressing. Routines are used by NicheStack during initialization, but are implementation-specific. You configure your MAC address to your preference or read it from your non-volatile memory.
  • network_utilities.h—Contains prototype for function get_board_mac_addr().