Nios® V Embedded Processor Design Handbook

ID 726952
Date 5/13/2024

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

Document Table of Contents

5.8.1. MicroC/OS-II Resources

This section describes the tasks, queue, event flag, and semaphores that implement the µC/TCP-IP Simple Socket Server application.


The following table lists the µC/OS-II tasks that implements the µC/TCP-IP Simple Socket Server application.
Table 38.  µC/OS-II tasks for the µC/TCP-IP Simple Socket Server
Tasks Description

Creates an instance of all the µC/OS-II resources.


Initializes tasks that do not use the networking services.

SSSSimpleSocketServerTask() Manages the socket server connection, and calls relevant subroutines to manage the socket connection.
LEDManagementTask() Manages the LEDs, driven by commands received from a µC/OS-II queue, named SSSLEDCommandQ.
LEDLightshowTask() Manages the LED light show, once enabled by the LEDManagementTask().

Inter-Task Communication Resources

The following global handles (or pointers) create and manipulate your µC/OS-II inter-task communication resources. All the resources begin with Simple Socket Server, indicating a public resource provided by the Nios V Simple Socket Server that is shared between software modules.

The SSSCreateOSDataStructs() function declares and creates these resources in simple_socket_server.c.

  • SSSLEDCommandQ: A µC/OS-II queue that sends commands from the simple socket server task, SSSSimpleSocketServerTask() to the development board LED control task, LEDManagementTask().
  • SSSLEDLightshowSem: A µC/OS-II semaphore that is referred by the LEDLightshowTask() before the LEDs update.
  • SSSLEDEventFlag: A µC/OS-II flag that corresponds to one of the LEDs.
Note: The µC/TCP-IP Simple Socket Server uses capitalized acronym prefixes to identify public resources for each software module, and lowercase letters with underscores to indicate a private resource or function used internally to a software module.

The following are the software module acronym identifiers:

  • SSS: µC/TCP-IP Simple Socket Server software module
  • LED: LED management software module
  • OS: µC/OS-II RTOS software component