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.

CCS/TMS320DM642: How to include a New Library into My Project?

Part Number: TMS320DM642

Tool/software: Code Composer Studio

I am using a TI's image processing lib in my project. This is the step while i am using the lib:

Step1:Download the package from the website: http://www.ti.com/tool/sprc264#technicaldocuments(TMS320C6000 Image Library (IMGLIB))

Step2:Install the package into my own direction:D:\TI\imglib_c66x_3_2_0_1

Step3:Create a new Project with a main.c file.

Step4:Modify the command link file. Add the new line like this:

-l "imglib2.l64P"

Step5:Build my project.Add get the error:

After that, I have try another way to use the lib: Set the Project's including path.

 The IMGLIB's usersguide tell me to do this!

And then i also set the include path for .h files:

Call the .h file in my project:

#include "stdio.h"
#include "math.h"
#include "stdlib.h"
#include "imglib.h"

int main()
{
  printf("Test the IMGLIB\n");
  return 0;
}

Build The project:

The imglib.h include the IMG_boundary_16s.h  and create the error:

So I want to know how to include the .h file correctly and completely. Is there any UsersGuide for us to Refer! I think that there are so many other libs need to be include into my Project, how can i fix all the questions as you tell me! Thanks a lot!

  • Hello,

    There are multiple ways to add a library, as you already know. Three ways come to mind off the top of my head:

    1) Using the -l option in the linker command file. This is what you tried the first time. This is a perfectly valid way to do it. But it is not so common anymore because you are reliant on using that linker command file. People also tend to forget about linker options in the linker command file. Hence it is not really used anymore.

    user4763388 said:

    Step4:Modify the command link file. Add the new line like this:

    -l "imglib2.l64P"

    The error you got is telling you that the linker could not find where that library is. Since you didn't specify the full path to it, it is going to look in the configuration subfolder of the project. If it is not there (which i would expect it is not), then you will get that error. Please have to full path to the library when using the -l option in the linker command file

    2) Add the library to the linker project properties. This is what you tried next. This is the more common and recommended way to add a library.

    3) the third way is to explicitly add the library to the project as if it was a source file. This is fairly common, but not as common as option #2

    As for your header file error:

    user4763388 said:
    The imglib.h include the IMG_boundary_16s.h  and create the error:

    That error is that it could not find IMG_boundary_16s.h. That header file is included via this #include statement:

    #include <ti/imglib/src/IMG_boundary_16s/IMG_boundary_16s.h>

    So to find that file, you need the below compiler include search path set up in the build options:

    D:/TI/imglib_c66x_3_2_0_1/packages

    Based on your screenshot, it doesn't look like you have that path set up. Adding it should resolve the issue.

    Thanks

    ki

  • Thanks for your reply. I have try to modify the search include path as you said. It doesn't work.But I tried to Set the Include Options like this and it works:

    After That i get another problem:

    I find it tell me that i don't define the type of my DSP target(Actruelly i am using a simulation module.My Simulation setting show in the Picture-3):

    This is my NewTargetConfiguration.ccxml file of the project!(I think that the type of my DSP would be select in this file,is that right?):

     Picture-3

    How can i fix this new problem?Thanks very much!

  • You are using a DM642, correct? If so, that has a C64x DSP. But you are using libraries for C64x+ and your imglib is for C66x. I'm not sure what you are doing is supported. I would create a new thread for your last question, and post it in the processors forum. The device experts can guide you best.

    Thanks

    ki

  • You are right, I am using a IMGLIB for C66x. Actually i can not get the IMGLIB for C64x.Here is the link,but no source file for me to download!

    http://www.ti.com/tool/sprc264?jktype=recommendedresults.

    There is no source file for me to download.

  • Please start a new thread in the Processor forum, with the topic being the recommended SW packages for DM642
    e2e.ti.com/.../791