SPMA080 April   2021 TM4C1292NCPDT , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1294NCZAD , TM4C1299KCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C1299NCZAD , TM4C129DNCPDT , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XKCZAD , TM4C129XNCZAD , TM4C129XNCZAD

 

  1.   Trademarks
  2. Introduction
    1. 1.1 TI-RTOS Download
    2. 1.2 License
    3. 1.3 XDCtools
    4. 1.4 Versions
    5. 1.5 Configuring NDK Modules
    6. 1.6 Socket-Based API
      1. 1.6.1 BSD Style Socket APIs
  3. Application Examples
  4. Application Setup
    1. 3.1 Hardware Setup
    2. 3.2 Software Tools
  5. Download and Import the Ethernet Examples
  6. How to Create an Ethernet Application for TI-RTOS NDK
  7. Enet_tcpecho_server_tirtos Example Overview
    1. 6.1 Build and Flash the Program
    2. 6.2 Check and Program the MAC Address
      1. 6.2.1 Using The LM Flash Programmer
      2. 6.2.2 Using CCS
      3. 6.2.3 Using UniFlash
    3. 6.3 Run the enet_tcpecho_server_tirtos Example
  8. Enet_udpecho_server_tirtos Example Overview
    1. 7.1 Run the enet_udpecho_server_tirtos Example
  9. Enet_httpServer_tirtos Example Overview
    1. 8.1 Configure NDK for HTTP Application
    2. 8.2 Embedded File System (EFS) Operation
    3. 8.3 Adding HTTP Server Content
    4. 8.4 Declaring HTML Files to EFS
    5. 8.5 Writing CGI Functions
    6. 8.6 Run the enet_httpServer_tirtos Example
  10. Enet_dns_tirtos Example Overview
    1. 9.1 How to Configure NDK for DNS
    2. 9.2 How to View the DNS Traffic on Wireshark
    3. 9.3 Run the enet_dns_tirtos Example
  11. 10Enet_sntp_tirtos Example Overview
    1. 10.1 Run the enet_dns_tirtos Example
  12. 11Enet_tcpecho_client_tirtos Example Overview
    1. 11.1 Configure the Server IP Address
    2. 11.2 Configure the SocketTest Server
    3. 11.3 Run the enet_tcpecho_client_tirtos Example
  13. 12Enet_udpecho_client_tirtos Example Overview
    1. 12.1 Run the enet_udpecho_client_tirtos Example
  14. 13Enet_httpget_tirtos Example Overview
    1. 13.1 How to Configure NDK for HTTP GET Example
    2. 13.2 Run the enet_httpget_tirtos Example
  15. 14References

How to Create an Ethernet Application for TI-RTOS NDK

The best way to start developing a TI-RTOS NDK application is to reference an existing example. Follow the steps below to view the NDK configuration for the enet_tcpecho_server_tirtos example.

  1. Every TI-RTOS project will contain a *.cfg file if the XGCONF is the method used for configuration as explained in Section 1.5. The *.cfg is used to add and configure various TI-RTOS and NDK modules and parameters. First, right-click on the *.cfg file, see Figure 5-1.
  2. Select “XGCONF” under the “Open With” submenu. Once done, you will first see a TI-RTOS Welcome page.
  3. Click the “Global” in the “Outline” tab will lead you to the NDK Welcome page. Next click the “System Overview” tab shown in box 5.
  4. Various NDK modules will be displayed graphically as shown in Figure 5-1. For example, you will see TCP, UDP and NAT modules in the Transport Layer. Depending on which modules/features you will need for your application, you will click the modules to enable them. For this example, only the TCP, UDP and the IP modules are enabled. Other examples in this application report may require different NDK modules to be enabled. Once enabled, you will see a green check mark. For instance, clicking the Internet Protocol (IP) module will take you to IP module configuration shown in Figure 5-2. Here you can enable the module and choose to obtain the dynamic IP address automatically or you can provide the static IP address.
  5. In box 5, various global NDK settings are partitioned into different tabs. Click on each one of them to get a feel for what they are. See Figure 5-3 where “netOpenHook” is defined as a user supplied hook function. The Network open hook function is called when the stack is ready to begin the creation of application supplied network tasks. You can see the definition of this function in the tcpEchoHooks.c file of the project. Other examples may use different hook functions. For instance, the enet_tcpecho_client_tirtos example will plug the hook function for Network IP address hook because the client will wait until it obtains the IP address before it attempts to connect to the server.
  6. You can also directly edit the Javascript-like *.cfg file for both the TI-RTOS and NDK configurations.
GUID-20210329-CA0I-9CQW-4KVL-TJCNPXS9JM8F-low.jpg Figure 5-1 NDK Configuration Using XGCONF
GUID-20210329-CA0I-BR5B-FGBT-W4C92S1J50QX-low.jpg Figure 5-2 IP Module Configuration
GUID-20210329-CA0I-3QNB-FGJH-3KKCRL286NX0-low.jpg Figure 5-3 Hooks Function Configuration