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.

LP-EM-CC2340R5: Managing Code Composer Projects

Part Number: LP-EM-CC2340R5

Tool/software:

I'm not sure why this is so difficult, but that's always been my experience with anything Eclipse based. Anyway here's my very basic project management issue that I'm unable to figure out. I'm using the latest version of Code Composer Studio v20.0.1.4_1.6.1 targeting LP-EM-CC2340R5.

What I Want

I have my source under Git control. The root folder (src) has a projectspec file along with all the source files that make up that project. I want to import the projectspec file and have all the source pulled into Code Composer. I don't want to copy it somewhere else since then it will no longer be under Git control. I don't want to change the folder structure. I just want to open the projectspec file and have all the files references in it pulled into Code Composer.

What I've Tried

Code Composer requires that I add a folder to my default workspace. I've added the source folder (src) under Git control, but it doesn't automatically pull in the project file that's at the root of the folder?! Which forces me to import the project. Code Composer then copies everything under the source folder into a new directory within the source folder! Why would this ever be a use case? When I import the projectspec file there's no checkbox to copy or not copy the project so that's not an option.

Please tell me what I'm missing because the Code Composer project management feels impossibly broken and I can only assume I'm just not understanding something here.

  • Hi Rob,

    Since CCS v20 uses a VSCode base, I'm hoping you will find a better Git Source Control environment than with the Eclipse-based CCS versions.  Here is some documentation on the topic:

    https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_project-management2.html?highlight=git#source-control 
    https://code.visualstudio.com/docs/sourcecontrol/overview 

    I've also notified the appropriate CCS experts to further support this request.

    Regards,
    Ryan

  • Hello,

    I want to import the projectspec file and have all the source pulled into Code Composer. I don't want to copy it somewhere else since then it will no longer be under Git control. I don't want to change the folder structure. I just want to open the projectspec file and have all the files references in it pulled into Code Composer.

    When CCS imports a projectspec, it will generate the project for it inside the workspace folder (or one of the roots of a multi-root workspace). This is the intended design.

    Code Composer requires that I add a folder to my default workspace. I've added the source folder (src) under Git control,

    Yes, you can add the folder under git control and then tell CCS to import the projectspec and generate the project in this folder.

    but it doesn't automatically pull in the project file that's at the root of the folder?! Which forces me to import the project.

    That's correct. All that was done was an additional folder was added to the environment, creating a multi-root workspace. If there was a full CCS project in there, that would then get picked up. But a projectspec is not a CCS project. It must be imported first. Adding/opening a folder to where a projectspec is does not automatically have CCS import the projectspec.

    Code Composer then copies everything under the source folder into a new directory within the source folder!

    Yes, a project will always be created inside a project folder of the name of project inside one the workspace folder or one of the roots (folders) of a multi-root workspace. This is intended behavior.

    When I import the projectspec file there's no checkbox to copy or not copy the project so that's not an option.

    projectspecs must generate the project inside a project folder of the selected folder/root. There is no option to not do this action. This has been the behavior of projects for some time.

    Thanks

    ki

  • How I solved my issue:

    Create a projectspec file defining the desired Code Composer files and project structure, but you need to set the action attribute to 'link' NOT 'copy'. This will create symlinks back to the original source files after you import the projectspec. The compiler includes will be broken on import so to fix that define a new pathVariable in the projectspec file defining the path as '.' then referencing the pathVariable in the -I include compile build options. Here's a truncated example:

    <?xml version="1.0" encoding="UTF-8"?>
    <projectSpec>
        <applicability>
            <when>
                <context
                    deviceFamily="ARM"
                    deviceId="Cortex M.CC2340R5" />
            </when>
        </applicability>
        
        <project
            title="example_project"
            name="example_project"
            configurations="Release, Debug"
            toolChain="TICLANG"
            connection="TIXDS110_Connection.xml"
            device="Cortex M.CC2340R5"
            ignoreDefaultDeviceSettings="true"
            ignoreDefaultCCSSettings="true"
            products="com.ti.SIMPLELINK_LOWPOWER_F3_SDK;sysconfig"
            compilerBuildOptions="
                -I${PROJECTSPEC_LOC}
                -I${PROJECTSPEC_LOC}/app
            "
            description="Example Application">
            
            <pathVariable name="PROJECTSPEC_LOC" path="." scope="project" />
            
            <property name="buildProfile" value="release"/>
            <property name="isHybrid" value="true"/>
            <file path="app/main.c" openOnCreation="false" excludeFromBuild="false" action="link" targetDirectory="app/Helpers">
            </file>
            </project>
    </projectSpec>
            
                

    Once you've created your projectspec file, all you need to do is import it into Code Composer, which will create a new directory in your workspace with your build products and settings. The actual project files that are under Git control are symlinked and your compiler includes are valid.