uGOOSE  1.0
GOOSE for Embedded Devices. Sample project for Renesas R-IN32-EC
Project Structure

Files

The project has been structured into four main directories:

Dir Description
APP Application
BSP Board Support Package
LIB Libraries
RTOS Real Time Operating System



Application (APP)

This is the where all the files relating to the Application are located.

This example project has three main application areas:

  • Goose sending and receiving
  • Network functions (DHCP. Ping, SNTP, HTTP)
  • Other Application (LED pattern generation)

Each area has been assigned to a task and each task is run in turn by the Real Time Operating System (RTOS).

The list of task in this project are:

Task Description
Init task Used to perform system start up and initialisation
MAIN task Used to start the application tasks and perform the LED flashing functions
uNet3 TCP/IP Stack
EtherTx Ethernet Sending task for sending of Ethernet Packets
EtherRx Ethernet Receive task for sending of Ethernet Packets
HTTPS Simple Web server
PHY0 Control of built in Ethernet PHY 0
PHY1 Control of built in Ethernet PHY 1
EtherSwitch Control of Ethernet Switch functionality (MAC learning etc)
EtherRaw Ethernet RAW frame receive - used to capture GOOSE packets before reaching the TCP/IP stack
EchoServer Echo Server for testing of TCP and UDP connections
Goose GOOSE task for sending and receiving of GOOSE packets
Idle The Idle task. This tasks runs when no other task is ready to run.



Board Support Package (BSP)

This section contains all the files that comprise the Board Support Package.

In embedded systems, a board support package (BSP) is an implementation of specific support code (software) for a given board that conforms to a given operating system. It is commonly built with a bootloader that contains the minimal device support to load the operating system and device drivers for all the devices on the board.

All the drivers (such as Ethernet, UART, Timers etc.) are located here.



Library (LIB)

This is where the external libraries are located. The three libraries used in this project are:

file Description
libos.a The uITRON HW-RTOS library
libunet3.a The Renesas TCP/IP stack library
uGOOSE.a The GridSoftware uGOOSE library



Real Time Operating System (RTOS)

This is where the Real Time Operating System files are located. The RTOS used in the project is uITRON.

Most operating systems appear to allow multiple programs to execute at the same time. This is called multi-tasking. In reality, each processor core can only be running a single thread of execution at any given point in time. A part of the operating system called the scheduler is responsible for deciding which program to run when, and provides the illusion of simultaneous execution by rapidly switching between each program. The type of an operating system is defined by how the scheduler decides which program to run when. For example, the scheduler used in a multi user operating system (such as Unix) will ensure each user gets a fair amount of the processing time. As another example, the scheduler in a desk top operating system (such as Windows) will try and ensure the computer remains responsive to its user.

The scheduler in a Real Time Operating System (RTOS) is designed to provide a predictable (normally described as deterministic) execution pattern. This is particularly of interest to embedded systems as embedded systems often have real time requirements. A real time requirements is one that specifies that the embedded system must respond to a certain event within a strictly defined time (the deadline). A guarantee to meet real time requirements can only be made if the behaviour of the operating system's scheduler can be predicted (and is therefore deterministic).

Traditional real time schedulers achieve determinism by allowing the user to assign a priority to each thread of execution. The scheduler then uses the priority to know which thread of execution to run next. A thread of execution is usually called a task.

uITRON

The R-IN32-M3 benefits from a HW-RTOS. This feature is well documented in a white paper by Jean J. Labrosse, CEO, Micrium.

Micrium HW-RTOS description