4.3. SYSBIOS ISDK Steps for creating stand alone switch example

4.4. Steps for creating Stand alone switch example in SYSBIOS Industrial SDK

Revision History

Revision Date Description
1.0 29-Sep-2014 Created initial version of the document
1.1 24-Jan-2017 Added PRU ICSS Ethernet/IP Package section

4.4.1. Introduction

The Stand alone switch application is not provided as a part of SYSBIOS ISDK. The Ethernet/IP application can be modified to use it as a switch application.This document describes the steps required to create Stand alone switch application from Ethernet/IP application. In this case of Switch example over ICSS, the Ethernet/IP firmware will act as switch firmware. The procedures apply to both ICSS and CPSW implementation.

4.5. Industrial SDK

  1. Remove all Ethernet/IP related source and header files from the example
    • All source and header files except main.c and appl_cnfg.h should be removed
  2. Exclude ethernatip_stack.lib from the Linker files search path
  3. Remove Ethernet/IP specific includes from main.c
    • eip_main.h
    • icss_dlr.h
    • icss_eip_driver.h
  4. Remove Ethernet/IP related function declarations
    • void LedFxn(UArg arg0, UArg arg1);
    • extern void app_exit_handler(int var);
  5. Comment out or remove Ethernet/IP specific function calls
    • eip_driver_init();
    • EIPMain();
    • eip_driver_start();
  6. Remove LED Task creation and Registering Application exit handler
  7. Remove Uart ISR registration from main()
    • UartOpen(uartInstance, UartIsr) to UartOpen(uartInstance, NULL)
  8. Edit app.cfg to use XGCONF to configure NDK
    • Commnet out Global.stackThreadUser = “&NDKACD_stackThread”;

4.6. PRU ICSS Ethernet/IP Package

  1. Remove all Ethernet/IP related source and header files from the example
    • All application source files except main.c should be removed
    • Keep the board specific files and soc specific files
  2. Exclude ethernatip_stack.lib and ptp lib from the libraries linked
  3. Remove Ethernet/IP specific includes from main.c
    • app_restart.h
    • icss_ptp.h
    • version.h
    • eip_main.h
    • icss_dlr.h
  4. Remove Ethernet/IP related function declarations and definitions
    • EIPAPP_initICSSDlrHandle
    • EIPAPP_initICSSPtpHandle
    • EIPAPP_taskFxn
  5. Comment out or remove Ethernet/IP specific function calls
    • System_atexit(EIPAPP_exitHandler)
    • EIPAPP_saveIODelaySection()
    • EIPAPP_initICSSPtpHandle(ptpHandle, emachandle)
  6. Remove EIP specific Task creation and semaphore creation
    • EIPUTILS_ledFxn
    • EIPAPP_uartTask
    • EIPAPP_taskFxn
    • appInitSem = Semaphore_create(0, &semParams1, NULL)
  7. Remove EIP handle, PTP handle, and DLR handle declarations and initialization code
    • ICSS_PtpHandle ptpHandle;
    • EIP_Handle eipHandle;
    • EIP_DLRHandle dlrHandle;
  8. Edit app.cfg to use XGCONF to configure NDK
    • Comment out Global.stackThreadUser = “&NDKACD_stackThread”;