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.

Examples Project about TCP IP on EK-TMC1294XL

Other Parts Discussed in Thread: EK-TM4C1294XL

Hi, I'm looking for project about TCP/IP on 1294x but no found.
Anyone have this? Thanks

  • Hi,

        I have in my example programs for Tiva Connected Launchpad enet_io, enet_lwip, enet_uip, enet_weather. Are those what your are looking for?

    -kel

  • Hi, Markel Robregado,

    I need a example project Tcp/IP server listen client and tranferdata.

  • Hi,

         Do you see these below at your Tivaware example program for Tiva Connected Launchpad? See, the readme file for each example program. See, if any of these example programs meets your requirements. 

         enet_io, enet_lwip, enet_uip, enet_weather

    -kel

  • I found eth_client.h and looking for eth_server.h

  • hi, everone can help me :)

  • Compile (enet_lwip) project and flash the EK-TM4C1294xl with the (*.out) file in a debug secession. Ping the network DHCP assigned IP address to verify LWIP IP stack is intact and an ICMP reply should be received.

    Open a web bowser, type ( http://x.x.x.x ) address you ping above and a TI web page should pops up.

  • BTW: The EK-TM4C1942xl sends text messages to the UART via the USB port on the host computer which can be viewed on Com3 with a terminal emulator such a YAT available at http://www.sourceforge.net

  • Thanks for that green flag :).

    Might a green flag salute Markel for stepping up to the plate early on?

    TI teachers try to get us to do some home work before the dog makes a meal of it but now your mind is open to other possible project areas.

    BTW: Heads up on GPIO port addresses, check the data sheet is in line with the code. I keep getting build warning (tcphdr) was set & never used but not able to find where in LWIP. TCP/IP stack still works ok even though this yellow warning message.

  • BP101 said:
    I keep getting build warning (tcphdr) was set & never used but not able to find where in LWIP. TCP/IP stack still works ok even though this yellow warning message.

    BP101,

    In file lwiplib.c are many #includes of other lwip source files. One of these is TivaWare\third_party\lwip-1.4.1\src\core\tcp_out.c which generates two warning instances (depending on how some #defines have been previously set) that generate the warning you indicated. Since these are only warnings about variables that are not being used, the code should work correctly.

    However, if you want to get rid of these warnings, I made the following changes to tcp_out.c:

    Lines 1382 to 1384:
      tcphdr = (struct tcp_hdr *)p->payload;

    #if CHECKSUM_GEN_TCP

    Replace with:
    #if CHECKSUM_GEN_TCP
      tcphdr = (struct tcp_hdr *)p->payload;

    Line 1367:
      struct tcp_hdr *tcphdr;

    Replace with:
    #if CHECKSUM_GEN_TCP
      struct tcp_hdr *tcphdr;
    #endif

    Line 859:
      tcphdr = (struct tcp_hdr *)p->payload;

    Replace with:
    #if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP
      tcphdr = (struct tcp_hdr *)p->payload;
    #endif

    Line 845:
      struct tcp_hdr *tcphdr;

    Replace with:
    #if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP
      struct tcp_hdr *tcphdr;
    #endif

    Note that this is not in T.I. written code, but in third-party LWIP supplied code.

  • Hi Dan and thanks for that needed input.

  • Hello,

    I get the same warning with tcphdr set but not used.
    Before implementing the FIX done by , I tried only to comment the declaration of tcphdr in file tcp_out.c

    For example in function "tcp_send_empty_ack"

    Line 845:
      struct tcp_hdr *tcphdr;

    Replace with:

      //struct tcp_hdr *tcphdr;

    Something wreid appear because in the local function "tcp_send_empty_ack" the local variable tcphdr is set for example at line 859.
    So the compilation should fail since it is no more declared but it doesn't!!! All went good with no more warning

    It seem to use another variable maybe the one used in tcp_in.c at line 63:

     static struct tcp_hdr *tcphdr;

    It's a static but since C files are included with file "lwiplib.c" then maybe this one is used for compile time?

    Then my question is which variable is really used ???
    For example if we define the macro CHECKSUM_GEN_TCP then which tcphdr is used? The local one or an external one?

    Maybe a bad design here...

    Regards,

    Max.

  • Orphan header warning was seemingly benign but good find.

    After clean project compiler still finds one more warning (struct tcp_hdr *tcphdr;).

    Maybe not (static struct tcp_hdr *tcphdr;) is not being used either?
  •  Hi,

    After clean project compiler still finds one more warning (struct tcp_hdr *tcphdr;).

    I did the same patch for the reminding warning too (at the begining there are two warning, then after comment out the two local declaration of struct tcp_hdr *tcphdr; makeclean and compile then there are no more warning).

    Something is dangerous here I think since it makes me think that a global variable is used but cannot figure out where...

    If someone can help me to understand.

    Regards.

  • Something is dangerous here I think >> Agree so we leave both benign warning intact after review.

    typedef (tcphdr) may be used as http header struct. The code allocates space in the pcb for the header via assigned macro.

    The application we build uses http dynamic headers on port 80 has hooks into includes folder httpserveraw/httpd.c. The app is allocating space via pcb header pointer into free PBUF so it seems to be ok.

    Sometimes we see LWIP debug assert STAT message p!=NULL or p->=1 and wonder if the header warning to blame. This week discovered most our TM4c1294 crashes, MPU resets were caused by default settings in the EMAC DMA mode configuration. Might include errata in reading EEROM while DMA memcopy SRAM to post http data using http headers.