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.
- 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.
- Select “XGCONF” under the “Open With” submenu. Once done, you will first see a TI-RTOS Welcome page.
- 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.
- 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.
- 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.
- You can also directly edit the Javascript-like *.cfg file for both the TI-RTOS and NDK configurations.