This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/SW-EK-TM4C129EXL: Tcp echo Thread

Part Number: SW-EK-TM4C129EXL
Other Parts Discussed in Thread: EK-TM4C129EXL

Tool/software: TI-RTOS

          I am working with EK-TM4C129EXL Development board. I am using Tcpecho  Example to connect with Ethernet network. It works fine. I need to make that whole TcpEcho example into a full function like Heartbeatfxn example in minimal footprint example.. Is that possible??? If that possible how to do that???

          Is there any flowchart of how that example works like program flow???? At which point of execution of the program tcpHandler, tcpWorker tasks runs???

  • Is it possible to configure and edit the example Tcpecho???
  • Yes. I'd rename the project, but you should be able to grow the example.

    Todd
  •       I am working with EK-TM4C129EXL Development board. I am using Tcpecho  Example to connect with Ethernet network. It works fine. I need to make that whole TcpEcho example into a full function like Heartbeatfxn example in minimal footprint example.. Is that possible??? If that possible how to do that???

          Is there any flowchart of how that example works like program flow???? At which point of execution of the program tcpHandler, tcpWorker tasks runs???

  • Navaeen,

    The netOpenHook function is called by the NDK once it is started (after BIOS_start). This function creates the tcpHandler task. Once a connection comes in, the tcpHandler creates a tcpWorker task.

    I'm sorry, but your other questions are pretty vague and general.

    Todd
  • I tried configuring netOpenHook in NDK Stack and then included tcpHooks.c , copied certain parts (header files , void tcpWorker, Void tcpHandler) of code from tcpEcho.c and pasted it in empty(minimal) project, but still it doesn't work.

    I am able to ping the IP address and I am not able to connect to the IP Address ....
  • You said the TCP Echo example works properly...correct? What did you change?
  • What I meant was I had created new project (empty minimal) then I copied tcp

    hooks.c and tcpHandler() and tcpWorker() from the tcpEcho() example. Also made few changes in NDK Stack  by adding tcpHooks to 

    NDK Stack. While doing these steps I could able to ping and I am not able to connect to IP Address.

  • Hi Naveen,

    I imported the empty example and made the following changes to mimic tcpEcho.

    1. Add the following include path in the project settings
    ${COM_TI_RTSC_TIRTOSTIVAC_INSTALL_DIR}/products/ndk_2_25_00_09/packages/ti/ndk/inc/bsd

    2. Copied the following NDK configuration from the tcpEcho example and added into empty's .cfg file
    /* ================ NDK configuration ================ */
    var Ndk = xdc.loadPackage('ti.ndk.config');
    var Global = xdc.useModule('ti.ndk.config.Global');
    var Ip = xdc.useModule('ti.ndk.config.Ip');
    var Udp = xdc.useModule('ti.ndk.config.Udp');
    var Tcp = xdc.useModule('ti.ndk.config.Tcp');

    Global.IPv6 = false;
    Global.stackLibType = Global.MIN;
    Global.networkOpenHook = "&netOpenHook";

    /* automatically call fdOpen/CloseSession for our sockets Task */
    Global.autoOpenCloseFD = true;

    Global.pktNumFrameBufs = 10;
    Global.memRawPageCount = 6;
    Global.ndkThreadStackSize = 1536;
    Global.lowTaskStackSize = 1024;
    Global.normTaskStackSize = 1024;
    Global.highTaskStackSize = 1024;
    Tcp.transmitBufSize = 1024;
    Tcp.receiveBufSize = 1024;

    3. Increase the size of the system heap in the .cfg. The stack needs more space than the 1024 specified in the empty example.
    BIOS.heapSize = 20480;

    For more information on memory usage in the NDK please refer to: processors.wiki.ti.com/.../TI-RTOS_Networking_Stack_Memory_Usage

    4. Copied the tcpEcho.c and tcpEchoHooks.c files from the TCP Echo example into the empty project. I removed empty.c also.

    I was able to build and run this as if it were TCP Echo.

    Todd