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 Linker flags command files

Hi,

In my CCS5 projects I use compiler command files to specify compiler options common to all of our projets (in Build > C6000 Compiler > Command files).

I want to do the same thing for the linker (i.e. to have a common file in which I list all the libraries I want to link with) because we have many projects (unitary tests, ...) that use the same lib config and I don't want to update each project in case of a library architecture/name modification.

In CCS I haven't seen a Command file option for the linker and if I add my linker file in the Compiler part, the --cmd_file option is correctly passed to both linker and compiler but the linker complain (Suppose I have -l"mylib1.lib" -l"mylib2.lib" ... in my file):

WARNING: invalid compiler option --lmylib1.lib

WARNING: invalid compiler option --lmylib1.lib

...

And it fails.

How can I do that?

Thank you.

Regards

Nicolas

  • Hello Nicolas!

    Linker file (makefile) is automatically-generated file. Its content is filled automatically when you define numerous settings of your project through Project's Properties menu. You can't edit this file directly.

    If you want to create new project with the same properties which some existing project has, then you can do following steps:

    - right button click on needed project

    - left button click on "copy" in pull-down menu

    - right button click on any project folder

    - left button click on "paste" in pull-down menu

    - "OK" in "create copy project" window

    After above steps you will get "Copy of project" in your workspace. Now you can rename this new project (through pull-down menu) and to do needed changes into it.

    Regards,

    Igor

  • Hello

    Thank you but I don't want to modify linker file or the makefile, I want to modify the library list (-l) given by the command line using a file common to all my projects (like the compiler --cmd_file command).

    Thank you

    Regards

  • Nicolas GUILLAUME said:

    I want to do the same thing for the linker (i.e. to have a common file in which I list all the libraries I want to link with) because we have many projects (unitary tests, ...) that use the same lib config and I don't want to update each project in case of a library architecture/name modification.

    You can add those options to a command file (.cmd) and pass it to the linker similar to other linker command files. The linker can accept multiple command files as input.

    For the command file to be treated as an input file you can either just add it to your project (if it has .cmd extension) or you can add it to the linker --library option (under Project Properties->Build->Linker->File Search Path).

  • Hello

    Thank you, that is exactly what I was looking for.

    Best regards

    Nicolas