This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using the uVision IDE with a GIT repo

I've recently started sharing development activities with another developer. I created a GIT from the folder: C:\Keil\ARM\Device\Nordic\nrf51822\Board\pca10001\ble\myProjectFolder

The project inside myProjectFolder builds fine on my machine. I upload everything in myProjectFolder to a Github repo called myProjectFolder, which the new developer then downloads to exactly the same location with a fresh install of the dev environment.

When he tries to build, all library and library include files are missing part of the path. The project is looking for them in C:\Keil\ARM\Device\Nordic\Board\ instead of C:\Keil\ARM\Device\Nordic\nrf51822\Board. We compared the project files in myProjectFolder and they are identical as you would expect, since they were cloned from Github.

The (temporary) fix for this is that he removes all the library files from the project and adds them again with the correct path. In addition, he has to modify the includes paths in the project. But now we're afraid to re-sync his work with the Git repo because it will likely break the project on my side.

I'm guessing that the file paths are generated on-the-fly when the project is opened using some setting in the dev environment outside the project file. And my setting is somehow different than his. Does anyone have a clue what might be going on?

  • The include paths of a Keil project is stored statically in the uvproj file (which is actually a renamed XML-like file). There is no way that these can change from one computer to another, so I'd recommend you to quadruple-check that the two of you have placed the folder in the exact same level of the hierarchy. :)

    Paths are however set to be relative, so if he for example put the project folder in Board\pca10001\ instead of Board\pca10001*ble*, the result you see is exactly what you'd get.

    Apart from this, your way of sharing the project sounds reasonable, as long as you remember to not ever change any SDK files, since these will not be included in your repository. This is really something you shouldn't do anyway, to make it easy and convenient to upgrade the SDK version, so your structure is absolutely the way I'd recommend you to do it.

  • Yes, I see what's going on. I installed my Nordic dev system a couple of months ago and it created a ble folder with projects that called out relative paths assuming that folder. The latest Nordic installer does not create that folder.

    As an additional complication, we recently purchased professional licenses for the Keil tools and the Keil installer left everything in place on my machine (with the older Nordic dev kit installation). But on the new machine with the latest Nordic dev kit installation the Keil installer deleted the Nordic-specific folders.

    We're testing now to see if we can get the latest Nordic installer and the latest Keil installer to play nicely together and produce a working dev environment.

  • I haven't seen the problem you describe, and on all the computers I've installed the latest SDK on, I do get the ble folder. As long as Keil is installed before the SDK, everything should install correctly, no matter if it is MDK-Lite or not. However, if you see a method that makes things fail consistently, I'm very interested to hear about it, so that it can be fixed in future releases.

    If you did solve this problem, I'd be happy if you could accept one of the answers, to clear up for others how to solve similar issues.

  • This turned out to be an install dependency issue. When we purchased the Keil licenses the instructions had us re-install Keil. It was not clear that we need to re-install the Nordic dev environment after that but we now know that is required.

  • Sounds good. :-) I'd be happy if you could accept one of the answers for this discussion, so that someone else with a similar problem can easily find the most helpful one.

Related