AN1121: Headless Builds with Simplicity Studio v4

Similar documents
AN1160: Project Collaboration with Simplicity Studio

EFM8 Laser Bee Family QSG110: EFM8LB1-SLSTK2030A Quick Start Guide

AN125 INTEGRATING RAISONANCE 8051 TOOLS INTO THE S ILICON LABS IDE. 4. Configure the Tool Chain Integration Dialog. 1. Introduction. 2.

AN999: WT32i Current Consumption

QSG114: CPT007B SLEX8007A Kit Quick- Start Guide

QSG144: CP2615-EK2 Quick-Start Guide

EFM8 Universal Bee Family EFM8UB2 Errata

EFM32 Pearl Gecko Family QSG118: EFM32PG1 SLSTK3401A Quick- Start Guide

QSG123: CP2102N Evaluation Kit Quick- Start Guide

Software Release Note

SMBus. Target Bootloader Firmware. Master Programmer Firmware. Figure 1. Firmware Update Setup

Figure 1. Precision32 AppBuilder

EFM8 Busy Bee Family EFM8BB2-SLSTK2021A Quick Start Guide

EFM32 Happy Gecko Family EFM32HG-SLSTK3400A Quick-Start Guide

UG365: GATT Configurator User s Guide

AN976: CP2101/2/3/4/9 to CP2102N Porting Guide

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

QSG155: Using the Silicon Labs Dynamic Multiprotocol Demonstration Applications

QSG153: Micrium s μc/probe Tool Quick- Start Guide

Translate HCSL to LVPECL, LVDS or CML levels Reduce Power Consumption Simplify BOM AVL. silabs.com Building a more connected world. Rev. 0.

QSG119: Wizard Gecko WSTK Quick-Start Guide

CP2103-EK CP2103 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

CP2104-EK CP2104 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

AN1143: Using Micrium OS with Silicon Labs Thread

QSG126: Bluetooth Developer Studio Quick-Start Guide

UG345: Si72xx Eval Kit User's Guide

CP2105-EK CP2105 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup USBXpress Driver Development Kit

QSG159: EFM32TG11-SLSTK3301A Quick- Start Guide

Date CET Initials Name Justification

AN1083: Creating and Using a Secure CoAP Connection with ARM s mbed TLS

8-Bit MCU C8051F85x/86x Errata

EFM32 EFM32GG11 Giant Gecko Family QSG149: EFM32GG11-SLSTK3701A Quick-Start Guide

QSG107: SLWSTK6101A/B Quick-Start Guide

UG366: Bluetooth Mesh Node Configuration User s Guide

Figure 1. CP2108 USB-to-Quad UART Bridge Controller Evaluation Board

UG313: Thunderboard Sense 2 Bluetooth Low Energy Demo User's Guide

AN1117: Migrating the Zigbee HA Profile to Zigbee 3.0

EFM8 Busy Bee EFM8BB1 Errata

UG254: CP2102N-MINIEK Kit User's Guide

QSG107: SLWSTK6101A/B Quick-Start Guide

AN888: EZR32 Quick Start Guide

Wireless Development Suite (WDS) is a software utility used to configure and test the Silicon Labs line of ISM band RFICs.

EFM8 Universal Bee Family EFM8UB1 Errata

AN1083: Creating and Using a Secure CoAP Connection with ARM s mbed TLS

Date CET Initials Name Justification

QSG107: SLWSTK6101A Quick-Start Guide

EFR32MG13, EFR32BG13 & EFR32FG13 Revision C and Data Sheet Revision 1.0

AN719 PRECISION32 IDE AND APPBUILDER DETAILED TUTORIAL AND WALKTHROUGH. 1. Introduction. Figure 1. Precision32 IDE and AppBuilder Walkthrough Overview

AN1106: Optimizing Jitter in 10G/40G Data Center Applications

Humidity/Temp/Optical EVB UG

UG369: Wireless Xpress BGX13P SLEXP8027A Kit User's Guide

AN1139: CP2615 I/O Protocol

USBXpress Family CP2102N Errata

WT12 EVALUATION KIT DATA SHEET. Monday, 09 September Version 1.7

AN1154: Using Tokens for Non-Volatile Data Storage

EFR32 Mighty Gecko Family EFR32MG1 with Integrated Serial Flash Errata History

UG271: CP2615-EK2 User's Guide

The process also requires the use of the following files found in the Micriµm Quick Start Package for the FRDM-KL46Z:

µc/probe on the Freescale FRDM-KL05Z without an RTOS

Bluegiga WF111 Software Driver Release Notes

μc/probe on the element14 BeagleBone Black

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

UG294: CPT213B SLEXP8019A Kit User's Guide

Router-E and Router-E-PA Wireless Router PRODUCT MANUAL

AN1095: What to Do When the I2C Master Does Not Support Clock Stretching

UG235.01: Developing Code with Silicon Labs Connect

BRD4300B Reference Manual MGM111 Mighty Gecko Module

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

μc/probe on the RIoTboard (Linux)

CP2114 Family CP2114 Errata

AN324 ADVANCED ENCRYPTION STANDARD RELEVANT DEVICES. 1. Introduction. 2. Implementation Potential Applications Firmware Organization

UG322: Isolated CAN Expansion Board User Guide

AN1119: Using RAIL for Wireless M-Bus Applications with EFR32

AN0059.1: UART Flow Control

Si1146 UVIRSlider2EK Demo Kit

AN888: EZR32 Simple TRX Application Quick Start Guide

EFM32 Zero Gecko EFM32ZG Errata

Table 1. Kits Content. Qty Part Number Description. Si4010 Simplified Key Fob Demo Kit 868 MHz

UG103.13: Application Development Fundamentals: RAIL

AN0018.1: Supply Voltage Monitoring

ETRX3DVK Development Kit Quick-Start Guide

Date CET Initials Name Justification

C8051F411-EK C8051F411 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Kit Overview. 3. Evaluation Board Interface LCD User Interface

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

UG274: Isolated USB Expansion Board User Guide

AN1023: HTTP SERVER EXAMPLE

AN706: EZSP-UART Host Interfacing Guide

AN0018.0: Supply Voltage Monitoring

C8051F36x-DK. C8051F36x DEVELOPMENT KIT USER S GUIDE. 1. Relevant Devices. 2. Kit Contents. 3. Hardware Setup Using a USB Debug Adapter

UG352: Si5391A-A Evaluation Board User's Guide

Figure 1. Traditional Biasing and Termination for LVPECL Output Buffers

AN1053: Bluetooth Device Firmware Update over UART for EFR32xG1 and BGM11x Series Products

Software Design Specification

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup Using a USB Debug Adapter

2. Key Points. F93x F92x F91x F90x. Figure 1. C8051F93x-C8051F90x MCU Family Memory Size Options

Software Design Specification

The Si50122-Ax-EVB is used to evaluate the Si50122-Ax. Table 1 shows the device part number and corresponding evaluation board part number.

Si1140-DK. Si1140 DEVELOPMENT KIT USER S GUIDE. 1. Kit Contents. Figure 1. Si1143 Evaluation Board

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

Transcription:

AN1121: Headless Builds with Simplicity Studio v4 This document describes how to use Simplicity Studio s TM Python scripting capability to automate the building process from the command line. There is also a reference section that describes the various functions that can be called from the Python script and the values for the function arguments. Examples are given for some basic scripts to perform builds in various scenarios. KEY FEATURES OR KEY POINTS Required setup to perform headless builds Command line examples Listing of available Python scripts for supporting headless builds API guide for commands that can be issued from a Python script silabs.com Building a more connected world. Rev. 0.1

Table of Contents 1. Requirements............................... 3 2. Using the Script.............................. 4 2.1 Launch a Command Window......................... 4 2.2 Using the <runscript.sh> or <runscript.bat> Script to Launch Simplicity Studio to Execute a Python Script................................. 4 2.3 Available Example Python Scripts....................... 4 2.3.1 <BuildExistingProject_v2.py>...................... 4 2.3.2 <ImportAndGenerateIsc_v4Pub.py>.................... 5 2.3.3 <ImportExistingProjectAndBuild.py>.................... 5 2.3.4 <ImportExistingZippedProjectAndBuild.py>.................. 6 2.3.5 <CopyProjectsAndBuild.py>....................... 6 2.3.6 <CopySdkSettingsFromWorkspace.py>................... 7 3....................... 8 3.1 Arguments............................... 9 3.2 Project-related Commands.........................10 3.2.1 getworkspace()...........................10 3.2.2 getworkspacelocation()........................10 3.2.3 getprojectsinworkspace()........................10 3.2.4 getopenstudioprojectsinworkspace()....................10 3.2.5 getproject(string name)........................10 3.2.6 getprojectforfile(string filepath).....................11 3.2.7 getbuildtimeout()..........................11 3.2.8 iscompatiblewithpartorgroup(object project, Object part).............11 3.2.9 importexistingproject(string path, Map<String, Object> options, IProgressMonitor monitor)..11 3.2.10 importslsproject(string pathtoprojectfile, Map<String, Object> options, IProgressMonitor monitor)..............................12 3.2.11 exportslsprojfile(object project, Map<String, Object> options, String pathtoprojectfile)..12 3.2.12 switchcurrentconfig(object project, Object configuration, IProgressMonitor monitor)...13 3.2.13 buildproject(object project, Map<String, Object> options, IProgressMonitor monitor)...13 3.2.14 cleanproject(object project, IProgressMonitor monitor).............13 3.2.15 getprojectinfo(object project)......................13 3.2.16 getconfiginfo(object project, String configname)...............14 3.2.17 setconfiginfo(object project, String configname, Map<String, Object> info, boolean force).14 3.2.18 setbuildtimeout(long timeout)......................14 3.2.19 deleteproject(object project, boolean deletecontent, boolean force).........15 3.3 AppBuilder-related Commands........................15 3.3.1 generateproject(object project, Map<String, Object> options)...........15 3.3.2 generateisc(object iscfiles, Map<String, Object> options).............16 3.3.3 generateiscfile(object iscfile, Map<String, Object> options)............16 3.3.4 getcompatibletoolchains(object iscfile)...................16 3.3.5 isafv6iscfile(object iscfile).......................17 3.3.6 validatesdk(object sdk)........................17 silabs.com Building a more connected world. Rev. 0.1 2

Requirements 1. Requirements Simplicity Studio v4 Installed Either: Cygwin, Git Bash, or another Windows-based GNU tool program or Windows command prompt Python 2.7.x installed (version 2.7.x is required) Obtain example Python scripts If this application note was obtained from within Simplicity Studio, from the Application Note dialog box, highlight AN1121 and choose the "Open Folder" option and the example Python scripts will be in a subfolder called "PythonScripts". If the application note was downloaded from www.silabs.com, then a zip file of the Python scripts should be available for download from AN1121SW.zip. silabs.com Building a more connected world. Rev. 0.1 3

Using the Script 2. Using the Script 2.1 Launch a Command Window Either start up the Windows OS bash program, either cygwin, git bash, or another Windows GNU based tool or else launch a Windows Command Prompt. 2.2 Using the <runscript.sh> or <runscript.bat> Script to Launch Simplicity Studio to Execute a Python Script The <runscript.sh> and <runscript.bat> are script files that ship with Simplicity Studio by default. They can be used to start Simplicity Studio by passing arguments to the program. The Simplicity Studio default workspace is used (C:\Users\[USERNAME]\SimplicityStu dio\v4_workspace) unless the -data workspace argument is specified. Other arguments point to the Python scripts and the script s arguments. [pathto_runscript] data [pathtoworkspace] [pathtoscript.py] [required script arguments] {optional arguments} For example: C:\SiliconLabs\SimplicityStudio\v4\developer\scripting\runScript.bat data /c/users/usera/simplicitystudio/v4_w orkspace/myprojectname./buildexistingproject_v2.py Detailed examples of running each Python script are given after the description of the script. 2.3 Available Example Python Scripts 2.3.1 <BuildExistingProject_v2.py> Use case: Headless build of an existing project in an existing workspace. Required files:.project,.cproject and project-specific source files. The script takes as an argument the name of an existing project folder in the workspace for the build. An optional argument specifies which build configuration to use - for example "GNU ARM v4.9.3 - Release". The project must already exist in the workspace. Python script-required arguments The name of the project folder. Python script-optional arguments -cfg is the build configuration for the build if not given then the current active configuration of the project is used. --AutoEnable If this option is specified then Simplicity Studio finds compatible values for the SDK and toolchain settings. The default is False. Examples of using this script: Using <runscript.sh> /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace /C/SWTools/sc ripts/buildexistingproject_v2.py SLSTK3401A_emode_2 /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace /C/SWTools/sc ripts/buildexistingproject_v2.py soc-smartphone /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace /C/SWTools/sc ripts/buildexistingproject_v2.py SLSTK3401A_emode_2 -cfg "GNU ARM v4.9.3 - Release" /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace /C/SWTools/sc ripts/buildexistingproject_v2.py SLSTK3401A_emode_2 -cfg "GNU ARM v4.9.3 - Release" AutoEnable Using <runscript.bat> \SiliconLabs\SimplicityStudio\v4\developer\scripting\runScript.bat -data \temp\test_v4_workspace \SWTools\scrip ts\buildexistingproject_v2.py SLSTK3401A_emode_2 -cfg "GNU ARM v4.9.3 - Release" silabs.com Building a more connected world. Rev. 0.1 4

Using the Script 2.3.2 <ImportAndGenerateIsc_v4Pub.py> Use Case: This script is for Silicon Labs AppBuilder based workflows for Wireless products. AppBuilder generates the project settings and required SDK source file links from the project.isc file. Required files:.isc file, customer specific source files. This script takes as arguments the.isc file used for building Mesh, Flex or BLE projects and the path to the stack that generated the project and optionally the toolchain. It will import the.isc file into the specified workspace, call AppBuilder to generate the project and then it will build the project. Script-required arguments The full path to the.isc file. Script-optional arguments -tc is the toolchain type Examples of using this script: /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace/ /c/swtools/s cripts/importandgenerateisc_v4pub.py /c/temp/project_input_isc/z3lightsoc/z3lightsoc.isc /c/siliconlabs/simplic itystudio/v4/developer/stacks/znet/v5.8.1.0 -tc=iar /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace/ /c/swtools/s cripts/importandgenerateisc_v4pub.py /c/temp/project_input_isc/z3dimmablelightsoc_2/z3dimmablelightsoc_2.isc /c /SiliconLabs/SimplicityStudio/v4/developer/sdks/gecko_sdk_suite/v1.1 -tc=iar 2.3.3 <ImportExistingProjectAndBuild.py> Use case: Build an existing project in a new workspace. This can be used for continuous integration builds where the workspace is based on a build number or some other identifier associated with the build. Required files:.project,.cproject and project specific source files. This script takes as arguments the path to the project folder (must contain.project and a.cproject files) to import. It will import the project into the specified workspace, and then it will build the project. Script-required arguments The full path to the project folder. Script-optional arguments -cfg is the build configuration for the build if not given then the current active configuration of the project is used. --AutoEnable If this option is specified then Simplicity Studio finds compatible values for the SDK and toolchain settings. The default is False. Examples of using this script: /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace/ /C/SWTools/s cripts/importexistingprojectandbuild.py /c/temp/project_input_src/slstk3401a_emode_2 /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace/ /C/SWTools/s cripts/importexistingprojectandbuild.py /c/temp/project_input_src/soc-smartphone -cfg "GNU ARM v4.9.3 - Default " silabs.com Building a more connected world. Rev. 0.1 5

Using the Script 2.3.4 <ImportExistingZippedProjectAndBuild.py> Use case: Projects that are shared between engineers or build machines in a zip file as opposed to being pulled from a version control system. Required files: A zip file containing the.project,.cproject and project specific source files. This script takes as arguments the path to the zipped project folder (must contain.project and.cproject files) to import. It will unzip the project into the specified workspace, import the project into the workspace and then it will build the project. Script-required arguments The path to the zipped project folder. Script-optional arguments -cfg is the build configuration for the build if not given then the current active configuration of the project is used. --AutoEnable If this option is specified then Simplicity Studio finds compatible values for the SDK and toolchain settings. The default is False if the option isn t specified. Examples of using this script: Using <runscript.sh> /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace/ /C/SWTools/s cripts/importexistingzippedprojectandbuild.py /c/temp/project_input_zipped/railtest_efr32.zip /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace/ /C/SWTools/s cripts/importexistingzippedprojectandbuild.py /c/temp/project_input_zipped/railtest_efr32.zip -cfg "GNU ARM v4. 9.3 - Default" Using <runscript.bat> \SiliconLabs\SimplicityStudio\v4\developer\scripting\runScript.bat -data \temp\test_v4_workspace \SWTools\scrip ts\importexistingzippedprojectandbuild.py \temp\project_input_zipped\railtest_efr32.zip -cfg "GNU ARM v4.9.3 - Default" 2.3.5 <CopyProjectsAndBuild.py> Use case: Building multiple projects in a new workspace. Projects can be stored in an existing workspace or any file structure that has all projects in subfolders to the specified path, but nested projects are not supported. Required files: Each project in a subfolder that contains the.project,.cproject and project specific source files. This script takes as an argument the path to a folder that has multiple project folders under it. It will copy all of the project folders into the specified workspace and then import each project into the workspace and then it will build the projects. Script-required arguments The path to the folder that contains one or more project folders. Script-optional arguments none Examples of using this script: Using <runscript.sh> /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace/ /C/SWTools/s cripts/copyprojectsandbuild.py /c/temp/project_input_src Using <runscript.bat> \SiliconLabs\SimplicityStudio\v4\developer\scripting\runScript.bat -data \temp\test_v4_workspace \SWTools\scrip ts\copyprojectsandbuild.py \temp\project_input_src silabs.com Building a more connected world. Rev. 0.1 6

Using the Script 2.3.6 <CopySdkSettingsFromWorkspace.py> Use case: Headless builds will be performed on a new workspace and SDKs external to Simplicity Studio are used for the build. Required files: There should be a.metadata folder with.plugins subfolder. Specific files that contain the SDK settings are then copied into the new workspace. This script imports the SDK settings from the workspace passed as an argument to the script. This script is mainly useful if there are external SDKs that are used when building projects. External SDKs means SDKs that are installed outside of the Simplicity Studio installation directory. It can also be used if some projects are built in a workspace that disables some of the SDKs installed in the Simplicity Studio installation directory. Script-required arguments The path to the workspace folder that contains the desired SDK settings. Script-optional arguments None Examples of using this script: Using <runscript.sh> /SiliconLabs/SimplicityStudio/v4/developer/scripting/runScript.sh -data /c/temp/test_v4_workspace/ /C/SWTools/s cripts/copysdksettingsfromworkspace.py /c/temp/project_input_src Using <runscript.bat> \SiliconLabs\SimplicityStudio\v4\developer\scripting\runScript.bat -data \temp\test_v4_workspace \SWTools\scrip ts\copysdksettingsfromworkspace.py \temp/project_input_src silabs.com Building a more connected world. Rev. 0.1 7

3. The following section describes the available arguments and commands that can be used to modify the above Python scripts or to create a custom script. silabs.com Building a more connected world. Rev. 0.1 8

3.1 Arguments Parameter String OPTION_BUILD_CONFIG = "buildconfiguration"; Description This variable is used to change the project s active build configuration. Example configuration strings: "GNU ARM v4.9.3 -Default" IAR ARM Release Keil 8051 v9.53 - Debug Parameter String OPTION_BUILD_TYPE = "buildtype"; Description This variable indicates the build type. Possible values: String BUILD_TYPE_FULL = "buildtype_full"; String BUILD_TYPE_INCREMENTAL = "buildtype_incremental "; String BUILD_TYPE_CLEAN = "buildtype_clean"; Full Build (clean and then build). Incremental Build Clean Parameter String INFO_BOARD_IDS = "boardids"; Description Current board ID See getprojectinfo() See getconfiginfo() Parameter String INFO_PART_ID = "partid"; Description Current part ID See getprojectinfo() See getconfiginfo() Parameter String INFO_SDK_ID = "sdkid"; Description Current SDK ID See getprojectinfo() See getconfiginfo() Parameter String INFO_TOOLCHAIN_ID = "toolchainid"; Description Current toolchain ID See getprojectinfo() See getconfiginfo() Parameter String INFO_CONFIGS = "configs"; Description A list of labels of the configurations defined for a project. See getprojectinfo() Parameter String INFO_CURRENT_CONFIG = "currentconfig"; Description The label of the current configuration for the project. See getprojectinfo() silabs.com Building a more connected world. Rev. 0.1 9

Parameter String OPTION_NO_AUTO_ENABLE= noautoenable ; Description If set to True (disabling auto enable), the function won t try and find the board / part / SDK or toolchain that is referenced by the project. The values for each must be set in the current project / workspace settings. The default is False, but the default is not recommended unless that setting is failing. Note that most of the Python scripts use an AutoEnable option (so the opposite of what is passed to the Simplicity Studio function) and it defaults to False. It is easier to have it be an optional Python argument with a default value. 3.2 Project-related Commands 3.2.1 getworkspace() Description: Gets the current Eclipse workspace. Prototype: getworkspace() Return Value: Returns an IWorkspace instance. 3.2.2 getworkspacelocation() Description: Gets the filesystem path of the current Eclipse workspace. Prototype: getworkspacelocation() Return Value: Returns the path as a string. 3.2.3 getprojectsinworkspace() Description: Gets a list of all the names of the projects in the workspace (including closed or non-studio projects). Prototype: getprojectsinworkspace() Return Value: Returns a string array of project names. 3.2.4 getopenstudioprojectsinworkspace() Description: Gets a list of all the names of the open SLS-compatible projects in the workspace. Prototype: getopenstudioprojectsinworkspace() Return Value: Returns a string array of project names. 3.2.5 getproject(string name) Description: Gets the Eclipse IProject handle for an existing open project. Prototype: getproject(string name) 1. name The name of the project. Return Value: Returns handle to the specified project. silabs.com Building a more connected world. Rev. 0.1 10

3.2.6 getprojectforfile(string filepath) Description: Gets the project that owns this exact file or return null if none could be found. Prototype: getprojectforfile(string filepath) 1. filepath The full path to the file. Return Value: Returns handle to the parent project or null if the file isn't contained by a project. 3.2.7 getbuildtimeout() Description: Gets the project build timeout (in milliseconds). Prototype: getbuildtimeout() Return Value: Returns timeout (in milliseconds). 3.2.8 iscompatiblewithpartorgroup(object project, Object part) Description: Determines whether the given project (name or IProject) is compatible with the given part. Prototype: iscompatiblewithpartorgroup(object project, Object part) 1. project The project name, IProjectHandle, or IProject. 2. part A part/group name, IPart[Group]Descriptor, or IPart[Group]. Return Value: Returns boolean true if compatible. 3.2.9 importexistingproject(string path, Map<String, Object> options, IProgressMonitor monitor) Description: Imports a previously-existing project (with.project file) into the workspace. Prototype: importexistingproject(string path, Map<String, Object> options, IProgressMonitor monitor) 1. path The path or URI to the project directory. 2. options A map of key to value options, or null; allowed keys: OPTION_PROJECT_NAME OPTION_NO_AUTO_ENABLE 3. monitor An optional progress monitor for progress and cancellation. Return Value: Returns a handle to the imported project. Error Handling: Throws Java CoreException if anything goes wrong. silabs.com Building a more connected world. Rev. 0.1 11

3.2.10 importslsproject(string pathtoprojectfile, Map<String, Object> options, IProgressMonitor monitor) Description: Imports a project from a.slsproj file. Prototype: importslsproject(string pathtoprojectfile, Map<String, Object> options, IProgressMonitor monitor) 1. pathtoprojectfile The full path to the.slsproj file. 2. options A map of key to value options, or null. Allowed keys are: OPTION_PROJECT_NAME OPTION_PROJECT_LOCATION OPTION_BOARD_ID OPTION_PART_ID OPTION_SDK_ID OPTION_TOOLCHAIN_ID OPTION_CONTENT_ROOT OPTION_NO_AUTO_ENABLE 3. monitor An optional progress monitor for progress and cancellation. Return Value: A return handle to the opened project. Error Handling: Throws Java CoreException if anything goes wrong. 3.2.11 exportslsprojfile(object project, Map<String, Object> options, String pathtoprojectfile) Description: Exports a project to a.slsproj file. Prototype: exportslsprojfile(object project, Map<String, Object> options, String pathtoprojectfile) 1. project The project name, IProjectHandle or IProject. 2. options A map of key to value options, or null; allowed keys: OPTION_PROJECT_NAME OPTION_LABEL string; to provide the label for the exported project OPTION_DESCRIPTION string; to provide the description for the exported project OPTION_IS_TEMPLATE boolean; set to True to configure the project for use in templates: Omit build configurations, promoting the build settings from OPTION_REFERENCE_CONFIGURATION to project level OPTION_REFERENCE_CONFIGURATION string; the name of the configuration to use for driving OPTION_IS_TEMPLATE the default is the current/active configuration OPTION_BOARD_COMPATIBILITY string; to override the purported board compatibility for the project OPTION_PART_COMPATIBILITY string; to override the purported part compatibility for the project OPTION_SDK_COMPATIBILITY string; to override the purported SDK compatibility for the project OPTION_TOOLCHAIN_COMPATIBILITY string; to override the purported toolchain compatibility for the project OPTION_CONTENT_ROOT string; to override the URI used in the content root 3. pathtoprojectfile The path and filename of the.slsproj file to create. Error Handling: 1. Throws Java IOException if the file cannot be written. 2. Throws Java CoreException if anything else goes wrong. silabs.com Building a more connected world. Rev. 0.1 12

3.2.12 switchcurrentconfig(object project, Object configuration, IProgressMonitor monitor) Description: Switches the current configuration to the input configuration. Prototype: switchcurrentconfig(object project, Object configuration, IProgressMonitor monitor) param 1. project The project name, IProjectHandle, or IProject. 2. configuration The configuration, either its name or ID. 3. monitor An optional progress monitor for progress and cancellation. Error Handling: Throws Java CoreException if anything goes wrong. 3.2.13 buildproject(object project, Map<String, Object> options, IProgressMonitor monitor) Description: Builds/Cleans the project based on the options map using OPTION_BUILD_TYPE. Prototype: buildproject(object project, Map<String, Object> options, IProgressMonitor monitor) Specify the configuration to build with OPTION_BUILD_CONFIG (this will change the active configuration). 1. project The project name, IProjectHandle, or IProject. 2. options A map of key to value options, or null allowed keys: OPTION_BUILD_TYPE OPTION_BUILD_CONFIG OPTION_BUILDER_NAME OPTION_NO_AUTO_ENABLE 3. monitor An optional progress monitor for progress and cancellation Return Value: Returns buildresults with IMarkers and file changes. Error Handling: Throws Java CoreException if anything goes wrong. 3.2.14 cleanproject(object project, IProgressMonitor monitor) Description: This is a convenience method and will call buildproject with BUILD_TYPE_CLEAN and build the active configuration. Prototype: cleanproject(object project, IProgressMonitor monitor) 1. project The project. 2. monitor An optional progress monitor for progress and cancellation. Return Value: Returns buildresults with IMarkers and file changes. Error Handling: Throws Java CoreException if anything goes wrong. 3.2.15 getprojectinfo(object project) Description: Gets details about the project. Prototype: getprojectinfo(object project) 1. project The project name, IProjectHandle, or IProject Return Value: Returns map of keys to values for the following: INFO_PROJECT_LOCATION INFO_CONFIGS INFO_CURRENT_CONFIG Error Handling: Throws Java CoreException for nonexistent, closed, or non-studio project. silabs.com Building a more connected world. Rev. 0.1 13

3.2.16 getconfiginfo(object project, String configname) Description: Gets details about the given configuration of the given project. Prototype: getconfiginfo(object project, String configname) 1. project The project name, IProjectHandle, or IProject. 2. configname The configuration name. Return Value: Returns map of keys to values for the following: 1. INFO_BOARD_ID 2. INFO_PART_ID 3. INFO_SDK_ID 4. INFO_TOOLCHAIN_ID Error Handling:Throws Java CoreException for nonexistent, closed, or non-studio project. 3.2.17 setconfiginfo(object project, String configname, Map<String, Object> info, boolean force) Description: Sets details about the configuration. Any items in the map will be modified. Prototype: setconfiginfo(object project, String configname, Map<String, Object> info, boolean force) 1. project The project name, IProjectHandle, or IProject. 2. configname The configuration name. 3. info The map of INFO_... keys to values. INFO_BOARD_ID INFO_PART_ID INFO_SDK_ID INFO_TOOLCHAIN_ID 4. force If true, always apply changes even if nothing changed. Error Handling: Throws Java CoreException for nonexistent, closed, or non-studio project, or unable to change settings. 3.2.18 setbuildtimeout(long timeout) Description: Set the project build timeout (in milliseconds). Prototype: setbuildtimeout(long timeout) 1. timeout Timeout in milliseconds Error Handling: Throws Java CoreException if anything goes wrong. silabs.com Building a more connected world. Rev. 0.1 14

3.2.19 deleteproject(object project, boolean deletecontent, boolean force) Description: A convenience method to delete a project. It wraps the deletion in a workspace job so that it won't fail because a resource is in use. Prototype: deleteproject(object project, boolean deletecontent, boolean force) 1. project The project name, IProjectHandle, or IProject. 2. deletecontent Delete the disk content or just the project handle. 3. force A flag controlling whether resources that are not in sync with the local file system are tolerated. Error Handling: Throws Java CoreException if: This resource could not be deleted. This resource or one of its descendants is out of sync with the local file system and force is false. Remarks: Resource changes are disallowed during certain types of resource change event notifications. See IResourceChangeEvent for more details. 3.3 AppBuilder-related Commands 3.3.1 generateproject(object project, Map<String, Object> options) Description: Generates into this project using the first seen isc file or the isc file specified in the options map. This will work for both Afv2 and Afv6 depending on the isc file that is generated. Prototype: (Object project, Map<String, Object> options) 1. project The project name, IProjectHandle or IProject. 2. options A map of key to value options, or null; allowed keys: Afv2 & Afv6 Keys: OPTION_ISC_FILE_NAME: string; to specify which isc file to use - the first one found will be chosen OPTION_ISC_FILE_PATH: string; to specify the path to the isc file that should be used - can be project relative or absolute OPTION_GENERATE_PROTECTED_FILES: boolean; to specify whether any protected should overwritten OPTION_VERBOSE: boolean; specify if the generation process should be verbose Afv6 Only Keys: OPTION_GENERATE_ARCHITECTURES: list of strings, Space/Comma separated list of String (architecture IDs) Specify the list of generated architectures. If null, the default architecture will be used OPTION_ALLOWED_ARCHITECTURES: list of strings, Space/Comma separated list of String (architecture IDs) Specify the list of allowed architectures. If null, any framework valid architectures can be used OPTION_ALLOW_INTERNAL_STACK: boolean; specify whether an internal stack can be used to generate Error Handling: Throws Java CoreException if there is no isc file in this project or something goes wrong. silabs.com Building a more connected world. Rev. 0.1 15

3.3.2 generateisc(object iscfiles, Map<String, Object> options) Description: Runs the generation process on the input isc file. This will correctly operate on Afv2 or Afv6 depending on the input isc file. Prototype: generateisc(object iscfiles, Map<String, Object> options) 1. iscfile A string file path to the generated isc file 2. options A map of key to value options, or null; allowed keys: Afv2 & Afv6 Keys: OPTION_VERBOSE: boolean; specify if the generation process should be verbose Afv6 Only Keys: OPTION_GENERATE_ARCHITECTURES: list of strings, Space/Comma separated list of String (architecture IDs) Specify the list of generated architectures. If null, the default architecture will be used OPTION_ALLOWED_ARCHITECTURES: list of strings, Space/Comma separated list of String (architecture IDs) Specify the list of allowed architectures. If null, any framework valid architectures can be used OPTION_ALLOW_INTERNAL_STACK: boolean; specify whether an internal stack can be used to generate Error Handling: Throws Java CoreException if something goes wrong. 3.3.3 generateiscfile(object iscfile, Map<String, Object> options) Description: Runs the generation process on the input isc file. This will correctly operate on Afv2 or Afv6 depending on the input isc file. This is a utility method, fully equivalent to generateisc(object, Map). Prototype: generateiscfile(object iscfile, Map<String, Object> options) 1. iscfile A string file path to the generated isc file. 2. options A map of key to value options, or null; allowed keys: Afv2 & Afv6 OPTION_GENERATE_PROTECTED_FILES: boolean; to specify whether any protected files should overwritten OPTION_VERBOSE: boolean; specify if the generation process should be verbose Afv6 Only OPTION_GENERATE_ARCHITECTURES: list of strings, Space/Comma separated list of String (architecture IDs) Specify the list of generated architectures. If null, the default architecture will be used OPTION_ALLOWED_ARCHITECTURES: list of strings, Space/Comma separated list of String (architecture IDs) Specify the list of allowed architectures. If null, any framework valid architectures can be used OPTION_ALLOW_INTERNAL_STACK: boolean; specify whether an internal stack can be used to generate Error Handling: Throws Java CoreException if something goes wrong. 3.3.4 getcompatibletoolchains(object iscfile) Description: Returns the toolchain IDs that are compatible with the framework that the input isc file will use. Prototype: getcompatibletoolchains(object iscfile) 1. iscfile A string or file path to a *.isc file. Return Value: Returns a list of compatible toolchain IDs. Error Handling: Throws CoreException if there is no isc file in this project or something goes wrong. silabs.com Building a more connected world. Rev. 0.1 16

3.3.5 isafv6iscfile(object iscfile) Description: Returns whether the input file or string filepath is AFV6 or AFV2. Prototype: isafv6iscfile(object iscfile) 1. iscfile A string or file path to a *.isc file. Return Value: Returns true if the file is AFV6, false otherwise. Error Handling: Throws Java CoreException if something goes wrong. 3.3.6 validatesdk(object sdk) Description: Validates that all frameworks within this SDK load correctly. Prototype: validatesdk(object sdk) 1. SDK The SDK to validate Error Handling: Throws Java CoreException if there is a loading error silabs.com Building a more connected world. Rev. 0.1 17

Simplicity Studio One-click access to MCU and wireless tools, documentation, software, source code libraries & more. Available for Windows, Mac and Linux! IoT Portfolio www.silabs.com/iot SW/HW www.silabs.com/simplicity Quality www.silabs.com/quality Support and Community community.silabs.com Disclaimer Silicon Labs intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Labs products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Labs reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Labs shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products are not designed or authorized to be used within any Life Support System without the specific written consent of Silicon Labs. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Labs products are not designed or authorized for military applications. Silicon Labs products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons. Trademark Information Silicon Laboratories Inc., Silicon Laboratories, Silicon Labs, SiLabs and the Silicon Labs logo, Bluegiga, Bluegiga Logo, Clockbuilder, CMEMS, DSPLL, EFM, EFM32, EFR, Ember, Energy Micro, Energy Micro logo and combinations thereof, "the world s most energy friendly microcontrollers", Ember, EZLink, EZRadio, EZRadioPRO, Gecko, ISOmodem, Micrium, Precision32, ProSLIC, Simplicity Studio, SiPHY, Telegesis, the Telegesis Logo, USBXpress, Zentri and others are trademarks or registered trademarks of Silicon Labs. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders. Silicon Laboratories Inc. 400 West Cesar Chavez Austin, TX 78701 USA http://www.silabs.com