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.

Compiler/TM4C129ENCPDT: compiling issue

Other Parts Discussed in Thread: TM4C129ENCPDT, EK-TM4C1294XL, EK-TM4C129EXL

rt Number: TM4C129ENCPDT

Tool/software: TI C/C++ Compiler

Hello All,

I am trying to port and compile an existing project "enet_s2e" which was originally developed for EK-TM4C1294XL board by TI. I have successfully compiled and run the project on another board EK-TM4C129EXL.

As a second step, I am trying to make it a stand-alone project such that it doesn't rely on external libraries, therefore I have included all the required libraries in the Project Directory and modified the included libraries search paths accordingly as can be seen in the attached photo.

Now during the compilation, the compiler can see all the included libraries and hence able to link all files however I am getting this error. 

I am getting this error;

Description Resource Path Location Type
#20 identifier "lwip_stats" is undefined sys_arch.c /FreeRTOSUDP/third_party/lwip-1.4.1/ports/tiva-tm4c129 line 219 C/C++ Problem

and

Description Resource Path Location Type
#20 identifier "sys" is undefined sys_arch.c /FreeRTOSUDP/third_party/lwip-1.4.1/ports/tiva-tm4c129 line 192 C/C++ Problem

Following is the snapshot of the error screen.

The library search paths seems to be correct as can be seen in the following photo.

I have attached the projects in Zipped Form as well.

The zipped file FreeRTOSUDP.zip will not compile.

Please note, the same project compiled and run successfully when I did not changed the "include file search paths" . The idea is to include all the required libraries inside the project folder so it becomes portable and doesnt depend on external library paths.

I thank you all in advance for your cooperation.0728.FreeRTOSUDP.zip

FreeRTOS_UDP.zip

  • As can be seen in the photo, I tried to include absolute path just to see if I can temporarily fix the issue, but the issue is still there.
    I am still suspecting it to be a linking/path issue because the same project is working if I do not change the search paths.
  • Hello,

    Can someone please help me as I am still stuck with the problem?
  • Hi Sahil,

    Might it be that is not a define rather a test of (lwip_stats) defined else where?
  • how can i check that ?
  • Hold CTRL key mouse hover over( lwip_stats) click button to follow to define. Sometimes in CCS we have to move mouse to other open source file hover over some variables & click for the code assistant to kick into gear. Then go back to hover over what you want to find the path to defines.
  • Hi,

     I imported your project and change the SW_ROOT to C:\ti\TivaWare_C_Series-2.1.4.178 as for my TivaWare Installation and everything compiles fine.

  • Charles Tsai said:

    Hi,

     I imported your project and change the SW_ROOT to C:\ti\TivaWare_C_Series-2.1.4.178 as for my TivaWare Installation and everything compiles

    8015.FreeRTOSUDP.zipCharles I am sorry for zipping the wrong project directory. In fact it is the one which works for me as well because it is directing to the standard path. Here is the correct zipped project that has all the drivers being pointed to local project directory.

    Please find attached zipped file.

  • BP101 said:
    Hold CTRL key mouse hover over( lwip_stats) click button to follow to define. Sometimes in CCS we have to move mouse to other open source file hover over some variables & click for the code assistant to kick into gear. Then go back to hover over what you want to find the path to defines.

    Hi,

    I checked it, it points to the correct file :(

  • lwipopts.h? and is in the project root folder?
  • Rebuild/freshen files in the index after porting project?
  • Hi,

    Yes I can see the file "lwipopts.h" is in search path and it does exist.
    I rebuild and freshen the index as well. No Luck.....
  • 2251.FreeRTOSUDP.zipHello all,

    Did some one try to build the project ?

    I have made some further modification and is attached in zip form.

    I am waiting for your kind help.

    Please find the attached zipped file that has included all drivers with in the project directory.

  • Did you add an #include "lwipopts.h" top of (sys_arch.c) to see if path to define is discovered. Recall the define caused compiler issue (stats) buried inside another (h) file and moved (stats) into (lwipopts.h). 

    
    

  • Hi BP101,
    thanks for looking into the problem. I was having the same problem compiling but yet to figure out how to fix it.
  • BP101 said:

    Did you add an #include "lwipopts.h" top of (sys_arch.c) to see if path to define is discovered. Recall the define caused compiler issue (stats) buried inside another (h) file and moved (stats) into (lwipopts.h). 

    //*****************************************************************************
    //
    // ---------- Statistics state options ----------
    //
    //*****************************************************************************
    #define LWIP_STATS                     0  // No Print Stats == 0
    
    #if LWIP_STATS
    
    #define LWIP_STATS_DISPLAY                1
    //#define LINK_STATS                      0
    //#define ETHARP_STATS               (LWIP_ARP)
    //#define IP_STATS                        1
    //#define IPFRAG_STATS                    (IP_REASSEMBLY || IP_FRAG)
    //#define ICMP_STATS                      1
    //#define IGMP_STATS                      (LWIP_IGMP)
    //#define UDP_STATS                       (LWIP_UDP)
    //#define TCP_STATS                       (LWIP_TCP)
    #define MEM_STATS                         1
    //#define MEMP_STATS                      0
    //#define SYS_STATS                       0
    
    #else
    
    #define LWIP_STATS_DISPLAY              0
    #define LINK_STATS                      0
    #define ETHARP_STATS                    0
    #define IP_STATS                        0
    #define IPFRAG_STATS                    0
    #define ICMP_STATS                      0
    #define IGMP_STATS                      0
    #define UDP_STATS                       0
    #define TCP_STATS                       0
    #define MEM_STATS                       0
    #define MEMP_STATS                      0
    #define SYS_STATS                       0
    
    #endif /* LWIP_STATS */

    Hi,

    I included "lwipopts.h" in sys_arch.c as well, still getting the same error. it is so weird, I have been working on fixing this error for last 7 days now......

  • Charles Tsai said:
    Hi BP101,
    thanks for looking into the problem. I was having the same problem compiling but yet to figure out how to fix it.

    Thanks Charles for being still in the loop. 

  • Yes it is in the root folder and yes I cleaned the whole project refresh build entire project refresh the index etc...

    Even tried in a new workspace

  • Loaded your project - seems to be missing GIT links related to several LWIP folders. Notice the LWIP folders indicate (?) mark versus a yellow barrel like other project folders. Not very familiar with team projects yet Team under project properties may allow one to patch a GIT project from the cloud folder path. The compiler seems confused how to locate the GIT path to find the LWIP_STATS defines and other issues besides that exist in the project.

    Perhaps Charles or Todd has a bit more info on that topic.
  • So I removed the git repository completely and rebuild the index and the whole project. Didn't help..

  • Have you cleaned & tried switching to a lower compiler version for the project? Sometimes the order of (#include"xx") top of C file effect the way compiler/linker traverses the folder path. If you modified the original (porting) project settings your issue might have been self inflicted?
  • Like I said and as in the thread description, I need to  make it a single directory project having all drivers files part of the same directory. I agree it is self inflicted but as I shared both the project in zipped form and you even tried them yourself. There doesnt seem to be any thing wrong apparently. The same files the same drivers get compiled successfully if not copied to the project directory......

  • As you can see all files and paths are properly linked and still having problem !!
  • Hey,

    I once had the same problem, but not with the same class.
    Sometimes the compiler won't connect to the path in which the lwip_stats entity is defined, this can have many problems, in my case the root file didn't had the entity in it, even though it should have. So the easiest way would be to redefine lwip_stats entity. If it's not a higher framework your using you can simply add the code into another file and include that, simply get a file in which lwip_stats is defined and than include it and pinpoint directly on that entity in your coding. This should solve the problem.
  • Did you have linked resources on the original project linked resources tab (project properties) that did not come across during porting?
  • Sahil was already told to try that several posts ago and even copied them in a reply to me.
  • Any progress with the issue ?
  • Hi,

     I don't know exactly what happened. I have no luck with your project compile. When you copy the entire  third_party/lwip_1.4.1 to your project folder the CCS will be compiling all the files (.c files) under it. This is probably where the problem is and I don't know if all files are meant to rebuilt again.

    I did an experiment with enet_lwip example. First I replicate the third_party folder two levels up relative to the PROJECT_LOC and everything compiles fine. See below images. Note the enet_lwip_tmp example also has its own third_party folder with source files that need to be rebuilt. The include paths for the lwip stuffs are relative to the PROJECT_LOC/../..

     But if I replicate the third_party/loip-1.4.1 right under the PROJECT_LOC then I will be getting many compile errors. This is all I can say at the moment. 

     if you wish to make your project portable you don't need to make everything self with all files contained in the project folder. You should define the path variable and build variable to make your project portable. Please refer to the  overview about PATH variables and BUILD variables in the TM4C workshop document.