KDS and Version Control

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KDS and Version Control

Jump to solution
3,221 Views
davepfaltzgraff
Senior Contributor I

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".

 

Thanks.

Labels (1)
1 Solution
1,551 Views
liborukropec
NXP Employee
NXP Employee

For C/C++ project you should submit

.project

.cproject

for PEx project submit:

ProcessorExpert.pe

.ProcessorExpert.*

Please note the "." at the beginning of those files - on Linux they are hidden. Also hidden in eclipse IDE.

View solution in original post

11 Replies
1,551 Views
ky3orr
Contributor II

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.

0 Kudos
1,551 Views
BlackNight
NXP Employee
NXP Employee

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

0 Kudos
1,551 Views
dave408
Senior Contributor II

@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.

0 Kudos
1,551 Views
BlackNight
NXP Employee
NXP Employee

Hi Dave,

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

0 Kudos
1,551 Views
dave408
Senior Contributor II

BlackNight​ 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.  :smileyhappy:

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.

0 Kudos
1,551 Views
dave408
Senior Contributor II

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.

0 Kudos
1,551 Views
BlackNight
NXP Employee
NXP Employee

Hi David,

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:

pastedImage_1.png

This is the standard content of my ignore file (for Git):

/*.g_c

/*.g_x

/*.cwGeneratedFileSetLog

/Generated_Code

/Documentation

/Static_Code

/Debug

/ProjectInfo.xml

I hope this helps,

Erich

1,551 Views
dave408
Senior Contributor II

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.

0 Kudos
1,551 Views
remibeges
NXP Employee
NXP Employee

Hi Erich,

I believe some additional folders could be gitignored, please do correct me if I'm wrong :

/FLASH

/MQXLite

/Library

/Project_Settings/Debugger

/Project_Settings/Linker_Files

/Project_Settings/Startup_Code

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

0 Kudos
1,551 Views
BlackNight
NXP Employee
NXP Employee

Hi Remi,

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.

I hope this helps,

Erich

0 Kudos
1,552 Views
liborukropec
NXP Employee
NXP Employee

For C/C++ project you should submit

.project

.cproject

for PEx project submit:

ProcessorExpert.pe

.ProcessorExpert.*

Please note the "." at the beginning of those files - on Linux they are hidden. Also hidden in eclipse IDE.