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/TM4C1294NCPDT: Building multiple projects in a workspace

Part Number: TM4C1294NCPDT

Tool/software: Code Composer Studio

Hi,

I am developing embedded application on TM4C1294NCPDT and TI-RTOS using CCS v9.0.1 for development.

Case 1:

I have multiple projects in my workspace as mentioned below:

Project_Main: This is main embedded application project. This project uses library1.lib and library2.lib. Output of this project is .hex or .bin which will be flashed to microcontroller.

Project_Library1: This is library project which generates library1.lib.

Project_Library2: This is library project which generates library2.lib. This project uses library1.lib.

Project build order needs to be setup as below:

  1. Project_Library1
  2. Project_Library2
  3. Project_Main

Case 2:

I have multiple projects in my workspace as mentioned below:

Project_Main: This is main embedded application project. This project uses library1.lib and library2.lib. Output of this project is .hex or .bin which will be flashed to microcontroller.

Project_Library1: This is library project which generates library1.lib.

Project_Library2: This is library project which generates library2.lib. This project uses library1.lib. Also some configuration of this library is dependent on macros defined in "Project_Main".

Project build order needs to be setup as below:

  1. Project_Library1
  2. Project_Library2
  3. Project_Main

I need to setup my build order in CCS workspace in such a way that all independent projects should build first and then dependent project after building independent projects.

If I start compiling Project_Main first time then library project should build first and then application project. Is it possible ? To trigger compilation of one project from other project.

Please help me to resolve above cases.

Thanking you.

Best Regards,

Harshel

 

  • Harshel,

    You can set this up using the Project Dependencies feature. It is documented in this page: 
    http://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_project-management.html#project-dependencies

    Basically for Project_Library2, you set up a dependency on Project_Library1. And for Project_Main you set up a dependency on Project_Library2.

    Hope this helps.

  • Hi Arti,

    I tried case 1, it worked for me successfully.

    But for case 2, I need help.

    In case 2:

    "Project_Main" has symbol "MACRO_1" in "Predefined Symbols" in "Project Properties".

    Is it possible to make available such predefined symbol "MACRO_1" available in "Project_Library2" ? "Project_Library2" does not have same predefined symbol "MACRO_1".

    I have to make available "MACRO_1" from one project to other. Is it possible ? If possible then how can it be done ?

  • Harshel said:
    I have to make available "MACRO_1" from one project to other. Is it possible ? If possible then how can it be done ?

    You can do this (export a macro) from a dependent project to the main project that references it, but not the other way around. 

    For example, if the macro is defined in Project_Library2 and Project_Main has Project_Library2 set as a dependent project, then the macro can be exported from Project_Library2 to Project_Main, using the setting below. Note that to get to the C/C++ General settings you need to click on "Show Advanced Settings" at the bottom of the dialog.

    However, it seems that you want to do it the other way around. I don't believe that is possible.

  • Thanks for reply.

     

    As it is not possible.

     

    I have one more way to do it. Please let me know feasibility.

    Consider below scenario:

    In library project "Project_Library2", below conditional compilation is exists in my code.

     

    #if defined(CONFIG_1)

    /* Configuration for CONFIG_1 */

    /* Code for CONFIG_1 */

    #elif defined(CONFIG_2)

    /* Configuration for CONFIG_2 */

    /* Code for CONFIG_2 */

    #endif

     

    In pre-defined symbols "CONFIG_1" or "CONFIG_2" are provided.

    Is their any way to compile "Project_Library2", first with "CONFIG_1" and with "CONFIG_2" ?

    And output of "<ProjectName>_CONFIG_1.lib" and "<ProjectName>_CONFIG_2.lib" respectively.

    When I compile using CCS "Build/Rebuild Project" option, with one trigger of compilation 2 different libraries should be generated with each pre-defined symbol.

    Best Regards,

    Harshel

  • Yes, you can set up a library project with multiple build configurations, just like you can with executable projects.

    In your case, Project_Library2 can have two build configurations - one that defines CONFIG_1 and sets the output file name to <ProjectName>_CONFIG_1.lib, and another config that defines CONFIG_2 and sets the output file name to <ProjectName>_CONFIG_2.lib.

    More about build configurations in this page: http://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_project-management.html#build-configurations

    Hope this helps.