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.

FreeRTOS + LwIP

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

The tried to port LwIP with FreeRTOS on TMS570LS3137 MCU using the LwIP demo project (To obtain IP address from DHCP server). The HALCoGen didn't generate EMACCore0RxIsr&EMACCore0TxIsr. However, I called those functions and did some modifications in intvecs assembler.
I created a task which calls the LWIP function to get the IP address from server every 2000 ticks. 
I have to continuosly get the output on the console. But i get it only once. What could be the problem in this? 
What is the actual way of porting FreeRTOS with LwIP on TMS570MCU? There are examples for stellaris platform, but i didn'T find any for TMS570. 

  • Subramanya,

    Your question has been forwarded to our EMAC expert.

    We will be back to you shortly.

    Regards,

    Jean-Marc

  • Subramanya,

    We do not have an integration of lwIP & FreeRTOS for Hercules. And we do not have plans for such an integration. 

    Regarding the absence of EMAC interrupts, here are a few pointers:

    1. Have you enable the correct switch on the HDK hardware?

    2. via HALCoGen, have you correctly configured the VIM interrupt settings for EMAC interrupts?

    3. Check C0RXSTAT & C0TXSTAT registers to verify if the module has triggered interrupts to VIM.

    Regards,
    Pramod 

  • Hi Pramod, 

    Thanks for the reply.

    I dont think I need that anymore.
    I'm deleting this post.  

  • Well, I'm not able to delete the post. You can close this thread. 
    Thanks for your help. 

    Regards

    Subramanya

  • Hello,

    I'm also trying to get lwIP working with FreeRTOS on a TMS570 MCU. But I'm not successful until now.

    Is your code already working? Can you send or post it for me?

    Thank you

    BR

    Christian

  • Not really.
    But i could find one example( I haven't tried it). Though its for RM48 device, maybe of some use for you. I've attached that.7343.1104.lwIP.zip

    Actually even i'm trying to port FreeRTOS with ethernet from quite long time. It has never worked. And also, i couldn't get much help from TI as well.
    May be you can try once, and if it works please let me know.

    Regards

    Subramanya

  • Hi,

    thank you very much.. You helped me a lot.

    With your project I was able to adapt it to a TMS570LS3137. It's working fine on my HDK.

    Here is the project: 1376.lwip_FreeRTOS_TMS570LS3137.zip

    Please try it.

    Best Regards

    Christian

  • Hi, Christian

    I'm using your examples about the lwip connected with the FreeRTOS,but when I open the HALCoGen 3.05.00 and generate code(didn't modify anything), some errors occurs. It's about the sys_link.cmd file and some like "program will not fit into". I think it's the different version maks the errors happen.

    I want to know the version of your HALCodeGen when you debug the example, and can you give me the setup file about the HALCodeGen you used if you have?

    Best regards,

    yong 

  • Hi

    Hope the below forum Query answers your question. Please use the HALCoGen project file present in the zip file(0636.LWIP_03_05_01.zip )attached in the below Forum query.

    http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/267408/934744.aspx#934744

    Regards
    Prathap

  • Hi Yong,

    I think it was 3.03.00 but I'm really not sure. And I don't have the installer for this version anymore. Maybe there is a link somewhere on the TI homepage.
     
    Please also try the suggestion from Prathap.
     
    Best regards
    Christian
  • Thanks for replying, I'm trying to solve the porblem with Prathap's suggestion. Thanks a lot.

    Regards,

    yong

  • Hi,

    I tried to build  the above said project. with TMS570 but i am getting the following errors. Can you please check it and give me some guidlines.

    Description    Resource    Path    Location    Type
    #10008-D cannot find file    TCP             C/C++ Problem

    Description    Resource    Path    Location    Type
    #10010 errors encountered during linking; "TCP.out" not built    TCP             C/C++ Problem

    Description    Resource    Path    Location    Type
    unresolved symbol __aeabi_idivmod, first referenced in ./lwip-1.3.2/ports/hdk/lwiplib.obj    TCP             C/C++ Problem

  • Hi,
     
    looks like the linker doesn't find a symbol (__aeabi_idivmod). Maybe you are missing the runtime support library (rtsv7R4_A_be_v3D16_eabi.lib) in the properties of the project. But thats only a guess.
    Maybe a other person can help you better.
     
    Best Regards
    Christian
  • Hi !

     In the above said package in lwipopts.h header file nosys is set as 1.So i think we are not using any OS, and the FreeRTOS files are not there in the  1376.lwip_5F00_FreeRTOS_5F00_TMS570LS3137.zip file.So could you please provide the step by step procedure to integrate FreeRTOS and lwIP.I am using TMS 570 and the IDE is code composer studio 5

    thanks&regards

    Alphonsa

  • Hi Alphonsa,
     
    lwip doesn't use FreeRTOS in the demo project. But the FreeRTOS files are included (look in \TCP\source folder, os_* files)
    You can create a task and for example use the lwip raw api to create, open and use TCP connections. Look in vTask1 function for a demo.
     
    Hope this helps.
    Regards
    Christian
  • Hi Christian !

    when i compiled the project i am getting error because following variables are undefined.Any solution for this problem.In an earlier post you had point out that i have to include file .So can you help me with the guidelines to include that file.

    __TI_decompress_none                                                  
     __TI_decompress_rle24                                                 
     __TI_zero_init    

  • Hi Alphonsa,
     
    I've attached a screenshot where I meant to include the file. (red marked)
    Hope this helps.
    Best regards
    Christian
  • Hi Christian!

    Thank you for the support. I added that lib and now able to generate TCP.out correctly. But it is an empty project ,so could you please provide me the guidelines to run an application that uses both lwIP and FreeRTOS functionalities. My goal is to run CyaSSL on the top of FreeRTOS+lwIP stack.

    Thanks&Regards

    Alphonsa

  • Hi Alphonsa,
     
    I don't know CyaSSL and what it needs and I also don't have a source code with lwip that uses FreeRTOS that I can post here. But I try to give a textual explanaition of what to do for a basic TCP service that uses a FreeRTOS task:
    *) create a new tcp pcb.
    *) bind it to IP_ADDR_ANY.
    *) put it to listen mode.
    *) attach a tcp_accept function which then attaches the tcp_recv function if the connection gets established.
    *) In the receive function put the received data to a FreeRTOS queue.
    *) In a task which waits for this queue process the data and send data back if needed.
     
    I hope this helps
    Best regards
    Christian
  • Hi Christian!

    Thank you for the guidelines. I am in the middle of a project, and for me to continue i have to implement lwip that uses FreeRTOS. So if you may get it in future please post it in the forum.

    Thanks&Regards

    Alphonsa

  • We have invest quite lot of time to port lwIP to FreeRTOS and RTEMS for TMS570LS3137. Our initial ports based on Ti code has never been fully functional when converted to threaded model where all processing has been moved outside of interrupts handlers. The port to RTEMS has undergone massive changes/rewrite later and we achieved reasonable state now.

    The port is based on actual lwIP project git version which is approaching lwIP 2.0 release. When we have achieved RTEMS port functional status we have done porting back to Ti CSS and HalCoGen based infrastructure. The driver and lwIP has been successfully used with FreeRTOS 8.2.2 to build XCP Flash loader on TMS570LS3137 HDK and our own automotive grade board design rtime.felk.cvut.cz/.../ .

    The driver can be found in sourceforge.net/.../ repository.

    git clone git://git.code.sf.net/p/ulan/lwip-omk

    Actual WIP version of the code is on omk-devel branch. The integration files for FreeRTOS, RTEMS and generic POSIX API providing OSes are included. The EMAC code uses RTEMS BSP TMS570 headers which has to be added to the project when it is compiled for FreeRTOS and CSS now.

    Please, contact us if you have interest in the proper port to FreeRTOS if you want to use Ti headers. Building with hybrid headers works reliably but it is not easy to setup. Our sources build for RTEMS is relatively easy.

    Instructions how to build RTEMS BSP can be found in RTEMS project repository master branch

    git.rtems.org/.../README

    RTEMS lwIP test application is part of our examples repository

    rtime.felk.cvut.cz/.../applwiptest

    But anyway, contact me in the case of interest to get on a track faster.

    You can find my e-mail address easily by search for my name or on our group web.

    Best wishes,

    Pavel Pisa

    Industrial Informatics group at Czech Technical University in Prague
    industrialinformatics.cz/