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.

TMS320F28384D: Implementing BSD-style sockets using the C2000Ware LWIP library

Part Number: TMS320F28384D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hey C2000 SW Team,

I have a customer evaluating the TMS320F28384D for a new project and we are hoping you can help to provide guidance on implementing BSD-style sockets using the C2000Ware LWIP library. Please see a summary of our inquiries below!

We want to use the LWIP library to implement BSD-style sockets, but we encountered the error "struct 'tcp_pcb' has no field 'lwip_recv'." After searching through threads and TI docs, we found the E2E thread linked below suggesting that some microprocessors do not support LWIP sockets. Our team has successfully used LWIP sockets on different ARM processors, so we assumed our initialization was correct. However, we couldn't find any documentation confirming that some TI processors lack this support. Based on the thread, we suspect our processor might have the same issue, but it doesn’t make sense to us why a software library like LWIP would be limited based on the processor. 

RTOS/TM4C129ENCPDT: Using sockets of lwiplib with microcontroller TM4C129X - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

We've looked at the following posts as well but none of them seem to use the BSD sockets we’re interested in. Can we take this to mean that our processor does indeed support them and we just need to dig in further on our specific error?

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1128558/tms320f28384d-example-program-for-dhcp-lwip

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1172148/tms320f28384d-lwip-connection-status?tisearch=e2e-sitesearch&keymatch=TMS320F28384D%20LWIP#

Thank you so much for your help with this and please let us know if anything needs further clarification! 

-Matt Calvo

  • Hey C2000 Team,

    I pinged you over email but also wanted to give a friendly nudge on this thread as well. Can you please help to provide an update on this?

    -Matt

  • Let me insert myself here and make sure you get some support. I don’t want to have the customer wait. Let loop in one of our experts from our ARM devices that understands lwip stack very well. I believe this may be an option in lwip stack which should be enabled, the library rebuilt and then made usable in the application. 

     can you help with this. Sockets are an optional feature that can be disabled in lwip? That may be why the customer sees the build error. 

  • HI Matt Calve,
      The LwIP support that is enabled with NO_SYS = 0 option in LwIP. The limitation is not with the C200 microprocessor, with the C2000Ware that the LwIP is enabled only with N0_SYS=1 (baremetal). There is no plan to support LwIP with FreeRTOS immediately,  and we may take this in next year second half. With LwIP with FREERTOS support, we cant enable BSD Socket support in LWIP.

    With regards,

    Pradeep

  • Hi

    lack of socket API support is not a HW limitation but SW driven.

    lwip stack supports two modes of operation : NO_SYS=1 implies it is being run in baremetal environment with no OS  and Task scheduling, synchronization features. In this configuration only the raw API is supported

    Both netconn sequential API and BSD socket style API need OS support. Hence to enable support for socket APIs, the lwip stack must be enabled to run with NO_SYS=0 configuration and with necessary support for OS porting (OSAL layer)

    As of now, the lwip stack for c2000 is built to support only the baremetal mode, and hence only low level RAW APIs can be supported.

    We are evaluating support for lwip +FreeRTOS (and with that support for BSD style socket) as part of future roadmap

    Regards
    Sriram

  • Hi Nima/Pradeep/Sriram,

    Thank you all so much for jumping in to support us on this thread and for your detailed feedback!

    I've gone ahead and passed this all along to the customer and will have them comment back on this thread directly with any follow-up questions they may have.

    -Matt