Simplicity Headless Operation

by <a href=""><font color="#000000"><font size="2">Hero Employee</font></font> </a> jonorem on ‎10-21-2014 01:54 PM - edited on ‎02-20-2017 04:07 AM by Administrator Siliconlabs


How can I use Simplicity IDE to compile programs from the command line


Headless Build


You can tell Studio to import/build projects from the command line like this:


studio.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild options -data workspace_path


options is any combination of the following: 

* - Import projects : -import {[uri:/]/path/to/project}
* - Import all projects in the tree : -importAll {[uri:/]/path/to/projectTreeURI}
* - Build projects / the workspace : -build {project_name_reg_ex/config_name_reg_ex | all}
* - Clean build projects / the workspace : -cleanBuild {project_name_reg_ex/config_name_reg_ex | all}
* - Add Include path to build : -I {include_path}
* - Add Include file to build : -include {include_file}
* - Add preprocessor define to build : -D {prepoc_define}
* - Replace environment variable in build : -E {var=value}
* - Append environment variable to build : -Ea {var=value}
* - Prepend environment variable to build : -Ep {var=value}
* - Remove environment variable in build : -Er {var}
* - Replace a tool option value: -T {toolid} {optionid=value}
* - Append to a tool option value: -Ta {toolid} {optionid=value}
* - Prepend to a tool option value: -Tp {toolid} {optionid=value}
* - Remove a tool option: -Tr {toolid} {optionid=value}

workspace_path is the path to the workspace to use.  On a build server this would probably be a temp directory in which to run the build.




studio.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -importAll C:\myProject -cleanBuild myProject/Release -build myProject/Release -data C:\tempWorkspace


This would import any .project files in C:\myProject into C:\tempWorkspace and do a clean build of the release build configuration of the project named myProject.


Handling Output


In the case where a headless build is used in a continuous integration server it is useful to have the output of the build streamed to the console for parsing or logging. In order to do this use studio_c.exe instead of the studio.exe executable. 


Before studio_c.exe can be used the contents of studio.ini should be copied to the studio_c.ini file.


In some cases the following my also be required to successfully route output to stdout. It must be the last switch in the command line used. 


-vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole


Finally note that  --launcher.supressErrors can be used to suppress popup's for automated builds.


Command Line Flashing


  For EFM32 products eACommander (part of Simplicity Studio) has a command line interface that can be used 


  For C8051 products the Flash Programming Utilities include a command like programmer. 




Control of Simplicity Studio via Python is under development. The API's are currently in flux and not suitable for production environments. A release date for this functionality has not yet been set.

by mgdmc
on ‎02-27-2017 09:27 AM

Where is the studio_c.exe located? After a fresh install of version 4.0.11,  a search of the installation directory for studio_c.exe yields only studio.exe.

by johnkuriakose
on ‎03-01-2017 04:41 AM

Headless is not working with studio.exe and studio_c.exe is missing for latest version of SSv4. Can someone from Silicon Labs explain how to do headless builds using Simplicity Studio version 4.