Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Using a project template, then putting it into source control(I've used a project template to begin a Kinetis application. Putting the modified project into source control has proved difficult due to virtual folders and links.)
Using a project template, then putting it into source control [message #1728282] Fri, 01 April 2016 15:31 Go to next message
Kirk Clendinning is currently offline Kirk ClendinningFriend
Messages: 5
Registered: April 2016
Junior Member
I began a Kinetis boot loader project using the template provided by NXP/Freescale. After modifications to suit our application, I wanted to put the code into a version control system. However, the project import utility does not allow a linked template to be imported with the Preferences->General->Workspace->Enable linked resources choice disabled. I tried to archive the project (which has virtual folders) but the archive appeared to preserve rather than resolve the links. Is it possible to have a self contained project for revision control check-in? Clearly, the initial check-in of code has to be all inclusive.

How can one resolve all of the links in a project without manually going through the complete project? I must have missed something, otherwise using Eclipse with SVN would be very difficult.
Re: Using a project template, then putting it into source control [message #1728297 is a reply to message #1728282] Fri, 01 April 2016 17:28 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
It's a little tough to understand the situation without seeing or knowing what this NXP template looks like. Can you share it or provide a URL?
In general, linked resources are kind of a relic of the past and, in my opinion, a bad idea. There are usually better ways to allow for content that can't live within the project (and thus can't be checked in to SCM). For example, User Libraries and Classpath Variables. Of course, for Java projects there are tools like Maven and Gradle that manage dependencies for you.
I guess if we knew some more about how the template and resulting project are structured, we might be able to provide some more specific advice.
Re: Using a project template, then putting it into source control [message #1728303 is a reply to message #1728297] Fri, 01 April 2016 17:43 Go to previous messageGo to next message
Kirk Clendinning is currently offline Kirk ClendinningFriend
Messages: 5
Registered: April 2016
Junior Member
Actually, getting the Kinetis SDK and boot loader is a bit involved and is only applicable to that platform. I think you'd need to have registered with NXP to download the SDK. http://kex.freescale.com/en/summary?cas_auth=1

The boot loader is at: http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/kinetis-symbols-footprints-and-models/kinetis-bootloader:KBOOT

However, the key element is as you pointed out, the projects all include links. To write code for a particular development card, in my case the Tower TWR-K65F180M, one chooses a project template from many, many templates available in the SDK. When the project is imported into Kinetis Development Studio, virtual links are generated to SDK files that are applicable for a particular processor and development board. Therein lies the problem. That is the starting place for a project. Now, after customizing that template, I'd like to check that source tree into subversion, but the tree doesn't exist as such, it is a combination of links and actual files.

It would be nice to be able to resolve all of the links so that they reside on disk, in the source tree and so, can be checked into a revision control system. In general, I understand the motivation for virtual folders and files in Eclipse, but I am a bit surprised that there isn't an obvious way to resolve the links so that a real source tree can be created.

Re: Using a project template, then putting it into source control [message #1728305 is a reply to message #1728303] Fri, 01 April 2016 18:11 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
Can you just manually resolve the links and copy the necessary files into your project?
I guess I don't agree with the idea of Eclipse automagically resolving links into project files; seems that would, generally speaking, defeat the purpose of using linked resources in the first place because once you "resolved" them they'd no longer be virtual/linked.

By the way, I'm surprised this "Kinetis Development Studio" doesn't provide some kind of SCM hooks to deal with this. Do they not generally support checking in the projects to SCM?

[Updated on: Fri, 01 April 2016 18:13]

Report message to a moderator

Re: Using a project template, then putting it into source control [message #1728306 is a reply to message #1728305] Fri, 01 April 2016 18:24 Go to previous messageGo to next message
Kirk Clendinning is currently offline Kirk ClendinningFriend
Messages: 5
Registered: April 2016
Junior Member
I can resolve them manually and did. It just seemed that there should have been a way to do it automatically. Again, I agree with the sentiment of links, but why should one put all of the code to support every Kinetis processor and development card into version control, when using a project template as a starting point? That's what it would take to use links in this case. While I can agree that there are very good reasons to use virtual folders in a build tree, there are also very good reasons not to.

In the case of NXP and the Kinetis design environment, the SDK being made up of many projects using virtual links to files saves space and reduces the complexity of supporting the SDK. However, once a developer has created a project that only requires 2% of the SDK, putting the complete SDK under version control to preserve the virtual links no longer makes sense, in my opinion. In that case having a way to import a project and create a non-virtual source tree would be more appropriate.

I'm a novice when it comes to Eclipse, only having used it sporadically through the years. I know there are hooks for some version control systems, but I didn't see one in my current IDE for Subversion, which is what we are using.

[Updated on: Fri, 01 April 2016 18:27]

Report message to a moderator

Re: Using a project template, then putting it into source control [message #1728307 is a reply to message #1728306] Fri, 01 April 2016 18:51 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
You have to install svn support in most distributions/packages of Eclipse. Eaiest way is via the Marketplace client under Help > Eclipse Marketplace... If your Eclipse doesn't include the Marketplace Client, you can install them from the Marketplace website: http://marketplace.eclipse.org/search/site/%2522subversion%2522


[Updated on: Fri, 01 April 2016 18:54]

Report message to a moderator

Re: Using a project template, then putting it into source control [message #1728308 is a reply to message #1728307] Fri, 01 April 2016 18:57 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
I'm still not understanding why you want to produce a self-contained project that does not link to the SDK. IF the SDK is required, generally, to do development on this platform, wouldn't you expect every developer to have the SDK and thus be able to import the project with links? As an example, that's how the Android Development Tools worked - there were Eclipse plug-ins and then there was the Android SDK, the two were separate but the Eclipse plug-ins know how to use the SDK appropriately and just did not work without it.

In any case, that's a feature that I would expect the SDK and customized-Eclipse-package to provide, not Eclipse directly. Like I said, outside the narrow context in which you're working, linked resources are somewhat rare and when needed they don't have a need to convert themselves to in-project contents.

It sounds like a nice feature to request of this Kinetis Development Studio, however


[Updated on: Fri, 01 April 2016 19:00]

Report message to a moderator

Re: Using a project template, then putting it into source control [message #1728309 is a reply to message #1728308] Fri, 01 April 2016 19:08 Go to previous messageGo to next message
Kirk Clendinning is currently offline Kirk ClendinningFriend
Messages: 5
Registered: April 2016
Junior Member
You are right in the case of the SDK. When experimenting within the SDK and learning about the hardware platform, using the complete SDK is very convenient. However, when using the SDK as a starting point for a custom device and application, one would like to distill the useable parts of the SDK, for instance a USB peripheral running under FreeRTOS, out of the SDK and use just is required. Given that the code is expected to run on a custom PCB, the SDK will no longer be applicable.
Re: Using a project template, then putting it into source control [message #1728310 is a reply to message #1728307] Fri, 01 April 2016 19:11 Go to previous message
Kirk Clendinning is currently offline Kirk ClendinningFriend
Messages: 5
Registered: April 2016
Junior Member
I'll try that. It would make sense that the version control system would resolve any link and send files to the server. I'd assume that whenever another developer checks out the project, everything necessary would have been included in a non-virtual source tree.

Thanks for the tip.
Previous Topic:Re: acceleo
Next Topic:How to update a single org.eclipse plugin?
Goto Forum:
  


Current Time: Tue Oct 20 07:29:28 GMT 2020

Powered by FUDForum. Page generated in 0.03465 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top