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/TMS320C5515: How can I build both executables and static libraries for a project?

Part Number: TMS320C5515

Tool/software: Code Composer Studio

I have a project that can produce two things: a static library, for integration with an executable that someone else might write, and an executable, for running unit tests on the library functions as I develop.

I cannot figure out how to organise this with Code Composer 7. If I create a project with either type (executable or static lib), I cannot create build configurations for the other type. I cannot have two different sets of project configuration files (.ccsproject, .cproject, etc) in the one project.

So how do I do this?

  • Jason Heeris82 said:
    If I create a project with either type (executable or static lib), I cannot create build configurations for the other type.

    A project can only have one output type - either Executable or Static Library. It is not possible to switch between the two output types via build configurations.  

    For your situation, you would need to create two projects. If the source files are common for the 2 projects, you could keep them in a single central directory and link the directory to both projects so any modifications to those files are picked up by both projects. 

  • AartiG said:

    For your situation, you would need to create two projects. If the source files are common for the 2 projects, you could keep them in a single central directory and link the directory to both projects so any modifications to those files are picked up by both projects. 

    Thanks for the info. When you say link, do you mean symlink on the filesystem, or some sort of linking that CCS can do? Because I'm trying to figure out how this works in source control too. I had thought to have two separate directories with the different kinds of project but the same code, but then of course I have to pick one of them to not check in to version control.
  • Jason Heeris82 said:
    When you say link, do you mean symlink on the filesystem, or some sort of linking that CCS can do?

    CCS projects allow you to either "add/copy" source files into them or "link" files. Linking files to the project would work better in your case because you can keep them in one central location and link them to multiple projects.

    Please see this section of the CCS User's Guide for more information on linking source files. The rest of the Projects and Build chapter might also be helpful in general with regard to creating and managing projects. 

    https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_project-management.html#adding-or-linking-source-files-to-project