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.

Command line build without importing project into Eclipse Workspace?

Other Parts Discussed in Thread: CCSTUDIO

Hi,

I use one PC acting as build/test-server. On this PC, scripts automatically checkout sourcecode from the sourcecode repository, build it and run some tests. It seems that having the project imported into an Eclipse Workspace is required to build from command line in CCS V5.1.

The problem here is that there are checkouts to several directories in different configurations of different projects. I want to checkout a sourcecode tree (containing the CCS 5.1 projectfiles) and build one single CCS 5.1 project without caring of what is imported in the Eclipse workspace and what not on that PC. I dont even want to open CCS on this PC, it just should produce an .out file. Is this possible somehow?

bye,

Thomas

  • Hi Thomas,

    Thomas9070 said:
    It seems that having the project imported into an Eclipse Workspace is required to build from command line in CCS V5.1.

    Yes, if you want to use the below:

    http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create

    Thomas9070 said:
    I want to checkout a sourcecode tree (containing the CCS 5.1 projectfiles) and build one single CCS 5.1 project without caring of what is imported in the Eclipse workspace and what not on that PC. I dont even want to open CCS on this PC, it just should produce an .out file. Is this possible somehow?

    If you are checking in the generated makefiles in the configuration subfolder, you can just call gmake in the directory and it would build your application. Otherwise you will have to import it into a workspace.

    Once thing you may want to investigate is to stop using CCS managed make projects and look at maintaining standard makefile projects.

    Thanks

    ki

  • Hi Ki,

    sorry for the late response. Yes - you are right. The best option for me is to checkin the CCS generated makefiles. With that I can use CCS on my desktop-PC to develop and debug the application and call gmake from the scripts running on the buildserver but still have the project options only defined once. So my question is anwsered - thanks!

    There is one small remaining problem: The generated makefiles contains mixed Linux/Windows line endings (LF or CR+LF) (I use CCS V5.2.0 in WinXP SP3). It seems that the generator mixes some linux line endings into the file. Due to that, the file cannot be checkin directly (subversion has a problem with such files...). I have to correct this manually before checking it in. It seems to work by replacing all single LF by CR+LF. In the generated makefile the line endings are like that:

    ################################################################################ (CR+LF)
    # Automatically-generated file. Do not edit!                                     (CR+LF)
    ################################################################################ (CR+LF)
                                                                                                                                                                      (CR+LF)
    SHELL = cmd.exe                                                                  (CR+LF)
                                                                                                                                                                      (CR+LF)
    CG_TOOL_ROOT := D:/CCStudio_v5.2/ccsv5/tools/compiler/c6000_7.3.5                (CR+LF)
                                                                                                                                                                      (CR+LF)
    ORDERED_OBJS += \                                                                (LF)
    $(GEN_CMDS__FLAG) \                                                              (LF)
    "./main.obj" \                                                                   (LF)
    (...)

    -l"ti/sdo/pspdrivers/pal_sys/dm648/lib/Debug/pal_sys_bios.lib" \
                                      (LF)
    -l"libc.a" \                                                                     (LF)
                                                                                                                                                                      (CR+LF)
    -include ../makefile.init                                                        (CR+LF)

    It would be nice if this would be fixed in a later CCS version,

    bye,

    Thomas

  • Hi Thomas,

    Thanks for the tip. I will make note of this issue. hopefully we can address it in the future.

    Thanks

    ki

  • Hello Ki,

    It is important to mention that the generated makefiles contain absolute paths. So if you try to build on a different location the wrong sources will be used. I find using generated makefiles dangerous to get strange behaviour because source files are used that one does not expect.

    It seems that the way is to create a portable project and import it in an empty CCS workspace (use an empty directory). With that the relative path information will be correct. As you posted, there is documentation here:
    http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create
    http://processors.wiki.ti.com/index.php/Creating_portable_projects_in_CCSv5

    It seems that a CCS workspace is more a storage for temporary files than something bound to a project. And that you can delete it between the builds. I thought that it has to be created first before you can build but it can be created by just importing an existing project.

    bye,

    Thomas

  • Thomas9070 said:
    It seems that a CCS workspace is more a storage for temporary files than something bound to a project. And that you can delete it between the builds. I thought that it has to be created first before you can build but it can be created by just importing an existing project.

    You are correct. CCS projects need a workspace but as you mentioned, you can choose a non-existent workspace location to import to and CCS will simply create a new workspace there. It's just like launching the CCS IDE and choosing a new workspace location. CCS will create a new workspace folder if it doesn't exist.

    ki