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. 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]. The only files and folders that should not be placed under source control are the build output folders that have the build configuration name (GNU ARM, IAR ARM, Keil 8051).
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 (note the 'quirks' have been fixed in Simplicity Studio 5, so the import is more straight forward):
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.
Simplicity Studio is based on Eclipse which uses a Java Virtual Machine (JVM) as the underlying platform. The JVM Java heap space by default is limited to 1/4 of the physical memory on the computer. With recent SDK releases the memory requirements during the AppBuilder "Generate" function and other memory intensive operations may exceed the default Java heap space maximum (see image below). This is especially true on computers that have 8 GB or less of memory, as the default maximum heap space would be 2 GB (1 GB for a 4 GB computer) on these computers.
The following are guidelines for reducing the amount of memory that Simplicity Studio uses in general as well as how to increase the maximum heap space Simplicity Studio will try to use based on memory availability in the system. Note the allocated memory will be released after the operation that allocated it finishes - so the memory is not permanently allocated to Simplicity Studio.
1. If there is less than 16 GB of RAM installed, then use a text editor to edit the studio.ini file from the Simplicity Studio installation directory and add the line
line. This will allow Simplicity Studio to try and allocate up to 3 GB of RAM for the Java heap space. If you still get an out of memory error (GC overhead limit exceeded) with the above setting then it can be changed to -Xmx4096m. For computers with 16 GB or more of memory, Simplicity Studio will use up to 4 GB of RAM by default (the default is to use up to 1/4 of the available memory), but this can be increased to a higher limit if issues are seen. Note that for 32-bit Windows installations the maximum Java heap size is 2 GB, so this setting will not work for 32-bit installations.
2. On some Windows systems there is a _java_options system environment variable that will limit Java applications to only using a small amount (256 or 512 MB) of Java heap space. Look for this variable under Look under [System] > [Advanced system settings] > [Environment Variables] in the [Systems variables] section for a _java_options variable and if it exists increase the value to 2g or 3g.
3. Only enable 1 or 2 SDKs per workspace (This is done at [Window] > [Preferences] > [Simplicity Studio] > [SDKs] and uncheck (disable) SDKs that are not being used). This change will make a big reduction in how much memory Simplicity Studio uses.
At the end of this KBA there are some tips for using multiple workspaces: https://www.silabs.com/community/software/simplicity-studio/knowledge-base.entry.html/2018/08/22/gecko_sdk_suite_tool-qlc4
4. Only have a few projects open in the Simplicity Studio project explorer. Other projects can be closed by right clicking the project folder and selecting [Close Project] or [Close Unrelated Projects].
5. Minimize the number of open files in the Simplicity IDE, especially .isc or .hwconf files.
6. Enable display of heap status ([Window] > [Preferences] > [General] and select [Show heap status]). Then periodically and especially before creating or generating a project with AppBuilder click the trashcan icon to run the garbage collector to free up memory.
7. Change the JVM Garbage Collector to a more aggressive garbage collector than the default one. Use a text editor to edit studio.ini and add this line
After the line
Note changing the garbage collector could slow down the Generate and other operations.
If the "About Simplicity Studio" dialog box ([Help] > [About Simplicity Studio] or on a Mac [Simplicity Studio] > [About Simplicity Studio]) shows "Invalid Installation" similar to this screenshot:
Then this can be manually repaired by following these steps:
MacOS: /Applications/Simplicity Studio/Contents/Eclipse/offline/autogen
MacOS: /Applications/Simplicity Studio/Contents/Eclipse/configuration/studio/assets/assets_autogen.assets3