Jump to content
jrychter

.gitignore for CCS projects?

Recommended Posts

I'm trying to start keeping my MSP430 code as clean as most of my other projects. Also, I'd like to release some projects on GitHub. But I'm finding it to be quite difficult. Problem is, in a project that uses CCS and Grace, a single main.c explodes into (at a first approximation) 1.54 bazillion files. Some of them are generated on every build, some are not.

 

I'm looking for advice, preferably in the form of a .gitignore file

Share this post


Link to post
Share on other sites

So what about lnk_msp430g2412.cmd? Do you version that? Or targetConfigs/MSP430G2412.ccxml?

 

And what about dotfiles? .config directory with everything that's inside, .ccsproject, .project, .settings dir?

 

From what I can see, those get created even if one does not use Grace, and I'm not sure what to do about them.

Share this post


Link to post
Share on other sites

So what about lnk_msp430g2412.cmd? Do you version that? Or targetConfigs/MSP430G2412.ccxml?

 

And what about dotfiles? .config directory with everything that's inside, .ccsproject, .project, .settings dir?

 

From what I can see, those get created even if one does not use Grace, and I'm not sure what to do about them.

Yes.. version all of them, since I need to use projects across multiple PCs. The .cproject and .project, I version at the end of day.

Share this post


Link to post
Share on other sites

Do a project clean then try using the "File/Export..." menu item. Export as an archive file and see what it puts in the zip. You can safely delete the Debug directory or just exclude it using the checkboxes in the export dialog.  The files in that list should give you a good idea of what is needed by someone else to be able to build from scratch inside of CCS (eclipse really)

 

-rick

Share this post


Link to post
Share on other sites

Do a project clean then try using the "File/Export..." menu item. Export as an archive file and see what it puts in the zip. You can safely delete the Debug directory or just exclude it using the checkboxes in the export dialog.  The files in that list should give you a good idea of what is needed by someone else to be able able to build from scratch inside of CCS (eclipse really)

 

-rick

Neat trick... I'm going to try that.

Share this post


Link to post
Share on other sites

I'm quite the novice to proper coding and using git. My 1/2 a cent if your a windows user is to use tortoisegit which provides a handy windows explorer based GUI. With that you simply add your main.c (and other source files) to your git repo which makes ignoring a billion other un revisioned files quite easy. With this method however you will have to create a new project file and import your source files should you wish to use it on a different computer. Provided your not doing anything fancy in the project file itself (such as writing to specific, non default locations in memory), there isn't really that much info that is lost. Once you get the paths down properly its quite easy to work with.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...