Simplicity Studio has a project importer that can be used to add a source controlled project to a workspace. Unfortunately there are some quirks in the project import process and so this Knowledge Base Article (KBA) will serve to point out those quirks and how to work around them until an update can be released that cleans up the project import operation.
For source controlled projects it is recommended to keep them in a folder that is external to the workspace and that one reason why it is necessary to import the project into the workspace. Also it is important to put the "hidden" files and project folders (ones that start with "." such as the .project and .cproject files and .internal_hwconfig, .pdm, .settings folders) under source control as well as any SDK supplied precompiled library (.a) or object (.o) files. A lot of source control systems will ignore library and object files by default, which is appropriate for the source files compiled with the project, but not the ones that originate with the SDK. To see these files look under the project properties [C/C++ Build] > [Settings] > [* Linker] under either [Libraries] or [Miscellaneous].
For this KBA the projects are stored in the C:\tmp\projects folder.
To add the projects to Simplicity Studio use [File] > [Import...] and then browse to the project folder to import:
Then click through the dialog boxes until the [Project Configuration] dialog is shown, this is were the 'quirks' occur:
The [Use default location] checkbox is marked and the default location is the project folder name in the current workspace. This makes sense except the files will not be copied into the workspace by the import operation and so Simplicity Studio does not find the project information:
Since the project and the .project file in this case is under source control, the files should not be copied into the workspace, so that part of the import defaults to the correct behavior. To correctly import the project the [Use default location] should be unchecked and then [Browse..] or enter the path were the project is stored (C:\tmp\projects\Gecko in this case). If the path is entered directly there is no issue, but if the [Browse...] button is used the project name will be duplicated (Gecko\Gecko in this case) and so the path must be corrected by removing the duplication before hitting [Finish]:
Depending on how the path is entered either an information message about importing from an existing location or a warning that the project location exists and has content will be displayed. Both of these messages are normal and it is okay to cick [Finish] to complete the project import. After the import the project is ready to use.
When working with projects under source control, unless using a source control plugin, it is recommended to close the project before making any changes to the project from the source control software. If a source file is removed from the project, it can still show up in the project due to references to the file in the workspace .metadata files. In this case the file will have a yellow '!' warning icon and it can be corrected by deleting the file from the project properties [Linked Resources] tab:
The delete operation will simply remove the reference from the .metadata files and then the project will build without error.
I hope this KBA helps avoid some headaches when working with source controlled projects.