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/CC2652RB: Rebuild of project modifies .gitignore file

Part Number: CC2652RB

Tool/software: Code Composer Studio

Hello,

Background on this issue is that we are using some scripts as post-build steps to do some signing/encrypting of images for FW updating procedures and outputting these files within subdirectories in our configuration build folders. Obviously, CCS has some sort of git integration because we can see the different icons for file statuses (modified/checked in/whatever). More obviously, we want to be able to control our .gitignore files so that we can exclude specific files, but retain things like the .hex/.out of each commit we make, as well as our generated files for FW updating.

Problem is, every time I do a build/rebuild of the project, the .gitignore file is altered to include whatever build configuration we just built, which excludes all the files that we are wanting to keep around.

Adding specific whitelisting to subfolders does not help at all either, as the addition of that main folder seems to dominate the ignore process.

Why is this happening? How do I prevent it from happening in the future?

  • Tyler,

    I am not an expert on the EGit tool in Eclipse. 

    Let me see if I can recap:

    • You have files in \BuildConfig folder that you want to keep around
    • When you build the .gitignore file is bein updated to include that \BuildConfig folder

    I am not seeing the .getingore file being updated automatically for me.

    I have a simple project in bitbucket.

    The .gitignore file had \Debug in it which is my active build config.

    I edited this file in CCS and removed \Debug

    When I build the project it stays empty.

    Here is my project with the original .gitignore

    I then edit the .gitignore to remove \Debug

    I then rebuild the project a few times.  I made some source changes as well.  THe .gitignore did not get updated for me.

    Regards,

    John

  • Correct. 

    More specifically, my project is a custom FW on top of the "simple_peripheral" example on the CC2652RB, not sure if different projects could be doing this, rather than the tool itself.

    Essentially if I rebuild my "Release" config, there is ALWAYS appended a /Release/ line item to the end of the .gitignore in the base directory for the project.

    One difference I notice from your setup is that the .gitignore file does not show up in my workspace. Again, not sure if that illuminates any differences in our setups.

    I tested my procedure once again - modified the .gitignore to delete the /Release/ line from the file, and ran a rebuild on the project -- the line reappeared. Ran through that again but just did a build rather than a rebuild, same results. 

  • Here is an experiment that you could run - within the simplelink_cc13x2_26x2 SDK v4.20.01.04 (most recent), there is an example BLE5 stack project for the CC2652RB called "simple_peripheral."

    Out of the box, this example when imported does not have a .gitignore file associated with it. Rebuild the project (mine was on Debug config) and all of a sudden you have a .gitignore with one line "/Debug/."

    I'm thinking this could likely be specific to the base code example, rather than CCS itself, but either way I'd like to be able to prevent it.

  • I changed my Project Explorer setup so that it shows .* files so that I could see .gitignore

    If you click on the filter button on Project Explorer it will bring up this dialog and you can uncheck .* resources to see the hidden files.

    For me the build is not touching the .gitignore that is located in the project folder.  Searching online I do see that that there is a preference that generates a .gitignore in the build configuration folder to automatically ignore "derived" resources.

    Just saw your post on the example to try.  I will do that.  Might take me a bit to setup as currently my repo is totally separate from my workspace.

    John

  • John - thanks for the tips to see the files within the project explorer - I see all the .* files now, including gitignore.

    It also appears that the "Automatically ignore derived resources" checkbox being cleared has fixed the issue for the example project. I then tested the same rebuild procedure on my code, and same solution, so all good here now!

    I think this solves it, I'll mark your response accordingly as well - thanks again.

  • Ok this is a bit of a long reply as I am logging what I am doing.

    I created a new workspace in my repo.

    I import the simple peripheral example from the SDK using Resource Explorer.

    Right away I see the .gitignore file

    I have not built yet.  I believe the file is getting created when the project is being added to the repo.

    Next I edit the file to remove \Debug

    After building the file still does not have \Debug in it.

    I then built the release config.  Still no change.

    Now my status is all ? in the project.  So I staged and committed the project files

    Build Debug again.

    Now I see /Debug/ in the file.

    Build Release again.

    /Release is added

    Delete the lines and save:

    Build.  Does not add the lines back. 

    Full clean and a build.  \Release was added.

    Now  building Debug.  \Debug was added.

    Thus I believe I am seeing the same as you now.

    Now clearing that option

    Clearing lines from file.

    Clean

    Build Debug

    Line was not added!

    Building release as well.

    Still not added.

    Thus try clearing that seeing to see if it helps.

    John