Processor SDK RTOS NDK

From Texas Instruments Wiki
Jump to: navigation, search


RTOS Software Developer Guide Networking



Overview

User Interface

Application

Debug


NDK Overview

The Network Development Kit (NDK) is a platform for development and demonstration of network enabled RTOS applications on TI processors and includes demonstration software showcasing capabilities across a range of network enabled applications. The NDK serves as a rapid prototype platform for the development of network and packet processing applications, or to add network connectivity to existing applications for communications, configuration, and control. Using the components provided in the NDK, developers can quickly move from development concepts to working implementations attached to the network.

The NDK provides an IPv6 and IPv4 compliant TCP/IP stack working with the TI-RTOS Kernel real-time operating system. Its primary focus is on providing the core Layer 3 and Layer 4 stack services along with additional higher-level network applications such as HTTP server and DHCP.

The NDK itself does not include any platform or device specific software. The NDK interfaces through well-defined transport interface, Network Interface Management UNIT(NIMU) to the PDK and platform software elements needed for operation. NIMU support. NIMU provides an interface between the stack and the device drivers through which the stack can talk to multiple instances of a single or various device drivers concurrently.

Network Development Kit Summary
Component Type Library
Install Package NDK
Install Directory ndk_<version>\packages\ti\ndk
Project Type Eclipse RTSC
Endian Support Little
Library Name For details of the libraries delivered as part of the NDK component, please refer to [1]
Library Path $(NDK_INSTALL_DIR)\packages\ti\ndk
Include Paths NDK_INSTALL_DIR is set automatically by CCS based on the version of NDK you have checked to build with.

${NDK_INSTALL_DIR}\packages\ti\ndk\inc
${NDK_INSTALL_DIR}\packages\ti\ndk\inc\tools


NIMU Transport

The NDK transport component of the PDK currently provided 2 implementations for the NIMU layer as described in the sections below. The following diagram is a high level depiction of the NDK/NIMU architecture with reference to the NIMU implementations. For details for the NDK/NIMU architecture, please refer to NDK Programmer's Reference Guide [2]
NDK ARCH.png

NIMU for CPSW

NIMU for CPSW provides a common CPSW interface library for NDK to communicate with when network stack is being implemented in the TI's Common Platform Ethernet Switch for ethernet packet processing. The library uses the CSL-R based API interfaces to provide NIMU interface for NDK. This package has NDK unit test examples for all supported EVMS as indicated in the table above.

Note: This module is only intended to be used with NDK. As such, users should not tie up to its API directly.

NIMU for CPSW Summary
Component Type Library
Install Package PDK
Install Directory $(TI_PDK_INSTALL_DIR)\packages\ti\transport\ndk\nimu
Project Type Eclipse RTSC
Endian Support Little
Library Path $(TI_PDK_INSTALL_DIR)\packages\ti\transport\ndk\nimu\lib
Reference Guides None


NIMU for ICSS

NIMU for ICSS (PRU-ICSS is Programmable Real-Time Unit Industrial Communications Subsystem) provides a common PRU-ICSS interface library for NDK to communicate with when network stack is being implemented in the PRU-ICSS subsytem for ethernet packet processing (firmware based switch running on PRU's which are part of the ICSS). The library used the ICSS_EMAC LLD to provide NIMU interface for NDK. This package has NDK unit test examples for all supported Devices as indicated in the table above. For details of the PRU-ICSS, please refer to ICCS-EMAC.

Note: This module is only intended to be used with NDK and requires ICSS-EMAC low level driver. As such, users should not tie up to its API directly.

NIMU for ICSS Summary
Component Type Library
Install Package PDK
Install Directory $(TI_PDK_INSTALL_DIR)\packages\ti\transport\ndk\nimu_icss
Project Type Eclipse RTSC
Endian Support Little
Library Path $(TI_PDK_INSTALL_DIR)\packages\ti\transport\ndk\nimu_icss\lib
Reference Guides None


Examples

PING Example

All NDK examples using CPSW interface can be found at the following location:

  • $(TI_PDK_INSTALL_DIR)/packages/ti/transport/ndk/nimu/example

All NDK examples using PRU-ICSS interface can be found at the following location:

  • $(TI_PDK_INSTALL_DIR)/packages/ti/transport/ndk/nimu_icss/example

Building the NDK examples

Use pdkProjectCreate.sh for Linux environment or pdkProjectCreate.bat for Windows.
This can be found under the <PDK>/packages folder. The only modification to these scripts, if any, is to update the CCS_INSTALL_PATH variable to point to CCS location if its not in the c:\ti\ccsv6 directory . Please refer to Rebuilding PDK for details of example project creation and how to run the example projects using CCS.

NDK Example Description

For each EVM Type supported, there is a example which demonstates "ping" use case. Once the application is loaded via CCS and run, you will be able to ping the configured IP address as specificed int he examples config file. For example, the config file for NIMU for CPSW for idkAM572x, can be found in ti/transport/ndk/nimu/example/am572x/armv7/bios/nimu_idk.cfg. If you wish to re-configure the IP address of the CPSW interface you will need to modify the following configuration parameters

  • Ip.address = "new ip address"
  • Ip.mask = "new ip mask"
  • Ip.gatewayIpAddr = "new gatewayIpAddr"

If you you do change these settings, you will be required to re-build the Example Project using CCS.

Name
Description
EVM Configuration
Expected Results
NIMU_BasicExample_evmXXXX_armExampleproject

Example demonstrates ping from external source to Gigabit Ethernet port on EVM.

icev2AM335x: Jumpers J18 and J19 need to be set properly to select CPSW or ICSS mode.

Pin2 and Pin3 need to be connected for ICSS mode and Pin1 and Pin2 for CPSW mode.

Update *.cfg file with static IP to test. NIMU for CPSW test Tests requires connection of configured Ethernet port under test to external PC on same subnet.

Run ping from any other PC in the same subnet

Ping response from the EVM verifies successful execution of example.

NIMU_ICSS_BasicExample_evmXXXX_armExampleproject

Example demonstrates ping from external source to PRU-ICSS Ethernet port on EVM.

icev2AM335x: Jumpers J18 and J19 need to be set properly to select CPSW or ICSS mode.

Pin2 and Pin3 need to be connected for ICSS mode and Pin1 and Pin2 for CPSW mode.

Update *.cfg file with static IP to test. NIMU for CPSW test Tests requires connection of configured PRU-ICSS Ethernet port under test to external PC on same subnet.

Run ping from any other PC in the same subnet

Ping response from the EVM verifies successful execution of example.


Running NDK example on ARM core of Keystone II devices

Before running the NDK example on ARM core of Keystone II devices(K2H/L/E/G), the following steps need to be performed.

  • Increase the NS_BootTask stack from 2048 to 4096 in netctrl.c:
TaskCreate( NS_BootTask, "ConfigBoot", OS_TASKPRINORM, 4096,(UINT32)hCfg, 0, 0 );
  • Rebuild the NDK
  • Rebuild NIMU driver


CCLink Example

Refer Processor_SDK_RTOS_CCLINK for details on steps for running cclink master and slave examples on NDK.

Additional Documentation References

Document Location
NDK Programmer's Reference Guide http://www-s.ti.com/sc/techlit/spru524.pdf
NDK User's Guide http://www-s.ti.com/sc/techlit/spru523.pdf
Network Developers Kit FAQ http://processors.wiki.ti.com/index.php/Network_Developers_Kit_FAQ
NDK Support Package Ethernet Driver Design Guide http://www-s.ti.com/sc/techlit/sprufp2.pdf
Rebuilding_the_NDK_Core Rebuilding NDK Core http://processors.wiki.ti.com/index.php/Rebuilding_the_NDK_Core