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.

How to include an object file in a CCE3 project?

Hi,

I want to create a C/ASM project which would include an additional object file when linking.

I have tried both options "Add Files to Project" and "Link Files to Project". Both options let me added the object file into the project. But when I "Build the project", the object file is not included in the linking.

I am using the latest version V3.2.2.1.8.

Any suggestions?

 

Thank you in advance.

 

  • Add the object file to the linker option --library.
    It is under Project->Properties->Linker->File Search Path->Include library file or command file as input

    You would also need to add the directory where it is located to the --search_path option.

  • Aarti said:

    Add the object file to the linker option --library.
    It is under Project->Properties->Linker->File Search Path->Include library file or command file as input

    You would also need to add the directory where it is located to the --search_path option.

    Thank you for your reply. Actually, I found that too but I was hoping there may be a better solution. I think CCE3 is supposed to be able to link user objects and/or libraries in the project to the output files. It is because the following is shown in the Help:

     

    Linker Options - File Search Path

    Add <dir> to library search path (--search_path)—specifies the directories where the linker can find object libraries. Multiple directory names must be separated by semi-colons. If an object library is not found in the current directory, the linker searchs the directories specified by this field. If you add libraries directly to the project list, you do not need to provide a search path for those libraries.

    Include library file or command file as input (--library)—specifies the names of object libraries to be linked into your program. If you add libraries directly to the project list, you do not need to specify them in this command.

    Anyway, after I post the question, I think I found a "better" solution for linking the user object files (but not for user libraries). I may change the "Command" in "MSP430 Linker V3.0" under the project properties from :

    "${MSP430_CG_ROOT}/bin/cl430" -z

    to :

    "${MSP430_CG_ROOT}/bin/cl430" -z $(OBJ_SRCS)

     

    In this way, user objects added or linked to the project are automatically added to the list of files for linking.

    I hope TI may fix the problem soon so that I don't have to tweak with the options.

     

     

**Attention** This is a public forum