Nios® V Embedded Processor Design Handbook

ID 726952
Date 5/26/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.4.5.2. MicroC/TCP-IP Simple Socket Server Example Design

The µC/TCP-IP Simple Socket Server example design software files are readily available in the example design zip file. They are stored in the sw/app folder.

The following software files constitute the µC/TCP-IP Simple Socket Server application:

  • alt_error_handler.c: Contains three error handlers, one each for the Nios V Simple Socket Server, µC/TCP-IP, and µC/OS-II.
  • alt_error_handler.h: Contains definitions and function prototypes for the three software component-specific error handlers.
  • led.c: Contains the LED management tasks.
  • led.h : Contains function prototypes for the LED management tasks.
  • log.h: Contains definitions for logging macros.
  • main.c: Defines the global structure of type alt_tse_system_info which describes the TSE configuration. Defines main(), which initializes µC/OS-II and µC/TCP-IP, processes the MAC and IP addresses, contains the PHY management tasks, and defines function prototypes.
  • simple_socket_server.c: Defines the tasks and functions that use the µC/TCP-IP sockets interface, and creates all the µC/OS-II resources.
  • simple_socket_server.h: Defines the task prototypes, task priorities, and other µC/OS-II resources used.
  • uc_tcp_ip_init.c: Contains MAC address and IP address routines to manage addressing. Routines are used by µC/TCP-IP during initialization, but are implementation-specific.
  • uc_tcp_ip_init.h: Contains definitions and function prototypes for µC/TCP-IP initialization.