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.

CCS5 and Linux development



Hello,

 

I try to build Linux application in CCS v.5.0.3 under Ubuntu, or Windows.

When I include into CCS project Linux related header files, for instance #include <pthread.h> - they cannot be found.

Do I need to configure Build Tools, or select specific project options?

I do not have such problems when I try to do the same with Code Sourcery G++.

 

Thanks,

Slavik

 

  • Slavik,

    Eclipse is able to manage makefile and GCC projects, however the job of properly configure all include and library directories, as well as the device/architecture options (-march, etc.) is left to the user.

    Therefore you should check the project properties and add the CodeSourcery header files. For example, <pthread.h> is located at:

    <CS_INSTALL_DIR>/arm-none-linux-gnueabi/libc/usr/include

    Check the page below that contains additional information:

    http://processors.wiki.ti.com/index.php/How_to_create_GCC_projects_in_CCSv5

    Hope this helps,

    Rafael

  • Rafael,

    Are there other Project Properties that should be configured such as -nostdinc (Do not search system directories) that can help ensure that the correct header files (in this case, the header files from CodeSourcery) are being used?

    -J

  • Hi,

    I haven't seen any issues in using system headers, but I see why this could become one. For this particular option you can simply point to Project Properties --> C/C++ Build --> Settings --> Cross GCC Compiler --> Preprocessor.

    In this case, you will have to specify each CodeSourcery include directory that contains headers used by your project. These can be set at Project Properties --> C/C++ Build --> Settings --> Cross GCC Compiler --> Includes

    Hope this helps,

    Rafael

  • Great.  I seem to have all the correct include paths for both include files and libraries (for CodeSourcery toolchain).

     

    The "issue" I'm concerned with is when I go to Project Properties --> C/C++ General --> Paths and Symbols.

    I see many of the CodeSourcery paths:

    arm-none-linux-gnueabi/include/c++/4.3.3

    arm-none-linux-gnueabi/include/c++/4.3.3/arm-none-linux/gnueabi

    ...

    arm-none-linux-gnueabi/4.3.3/include

    arm-none-linux-gnueabi/include

    arm-none-linux-gnueabi/libc/usr/include

    All of these are obviously what I want.

    However, they are immediately followed by

    /usr/include/c++/4.4

    etc.

    which concerns me.

    The real problem I am having is when I remote debug from CCSv5 [I may be getting off track of the original thread.]

    The first symptom:

    gdbserver: error initializing thread_db library, version mismatch between libthread_db and libpthread 

    [Quick searches have not yielded great results.]

    The second symptom:

    warning .dynamic section for "/lib/libpthread.so.0" is not at the expected address (wrong library or version mismatch)

    ...

    warning .dynamic section for "/lib/libc.so.6" is not at the expected address (wrong library or version mismatch)

     

    Basically, I'm trying to fix these issues so that I can move on to fixing real issues with my software (which might just be solved by this as well).

     

    Any hints, tips, or tricks would be appreciated.

    -Jeremy