What files other than source code should be submitted to version control?
I am interested in two areas - project related files and any required by the "Processor Expert".
For C/C++ project you should submit
for PEx project submit:
Please note the "." at the beginning of those files - on Linux they are hidden. Also hidden in eclipse IDE.
this post should help you: Version Control with Processor Expert Projects | MCU on Eclipse
It discusses the different files and their contents, and what to put (or not to put) into a version control system.
It was written originally for CodeWarrior, but the same things apply for KDS, only a few files are named differently.
It discusses as well the challenges to truely share the .pe file with multiple developers.
Below is an example project so you can see what is ignored/not ignored:
This is the standard content of my ignore file (for Git):
I hope this helps,
I believe some additional folders could be gitignored, please do correct me if I'm wrong :
I am not sure why the project settings folder contains debugger and linker outputs and startup code, but I'm pretty sure these souldn't go into version control as well
a simple test is to try out your project if it still builds/works with all the ignored files and folder ignored.
/FLASH: yes, this is the output folder as 'debug' in my case. That folder name depends on your project settings.
/MQXLITE: I think this is generated from the MQXLite Processor Expert component, so you can ignore this one.
Debugger settings: they are created at project time, but not aftewards. Do not ignore them.
Dito for Startup code, do not ignore them.
Linker file: that depends if you generate them from Processor Expert or not. If yes, then you can ignore the linker file, otherwise not.
The only problem I have with removing Static_Code is that anytime I do a fresh checkout from SVN, KDS wants to autogenerate Static_Code/System/PE_low_level_init.c. In a continuous integration environment, it *appears* that the dialog that pops up in KDS hangs the command line building. I'm going to look into this to see if there's an available switch to autoselect "Create" should this really be the problem.
How to store a complete workspace with projects?
I commited to repo all the data without the ones you porprse here to keep in .gitignore.
On second machine I pulled the data and KDS was not able to load projects.
I have added .metadata folder, but it didn't helped, beside its contents change frequently.
I don't know of a good way to do it. It's a bit of a headache supporting this on the build server. I ended up committing the .metaproject folder and stripping out as much as possible.
If you don't need to support a build server, then you can get away with just using the Project of Projects plugin and creating a .wsd.
Adding the .metadata folder to a version control system is not a good idea. The .metadata contains information and data specific to that workspace and machine. Store only the project folders in a version control system without the derived/generated files in the project folders. After pulling the projects from the version control system import the projects with File > Import > Existing Projects into workspace.
@Erich_Styger I understand that the metadata folder has a lot of machine-specific information in it, but the problem is that without it, it seem impossible to support a continuous integration server. In my experience, not having the .metadata folder prevents KDS from building projects from the command line. Not only does a workspace need to exist, it also needs to have all of the projects open if they are to be built successfully from the command line. Can you suggest any workarounds? I could not find anything about loading a Project of Projects file from the command line.
In that case, I recommend that you build with the make files, and not from the IDE.
And the 'Projects of Project' thing is a custom extension, here again you are better off using normal make files instead.
Erich Styger I have to confess that I have only really used makefiles once in my life, having done all development in Visual Studio and being extremely spoiled with solution files. I have been similarly spoiled with KDS.
I've tried to create a new makefile project using existing code, and nothing seems to happen. Similarly, I have imported a new makefile project using existing code, and nothing happens (i.e. no project is added to my workspace, and I'm not using working sets so there isn't any filtering going on here). I see that there's a makefile in my existing project's Debug folder, which is generated when I build. If I just need to invoke a different command (like make) and point to this makefile, that's fine, but I'm under the impression that I would still have had to first generate the PEx code, which requires that a project is first loaded and opened. I feel like this is a chicken-or-the-egg sort of situation.
Retrieving data ...