SimpleLinkTM Sensor and Actuator Plugin Getting Started Guide
Table of Contents
1. Introduction
This guide is intended to assist users in the initial setup and demonstration of running their first sample application. The guide explains how to install the SAIL Plugin and lists the various other tools required to get started with your first application.
2. Prerequisites
The user is expected to have the following:
- MSP-EXP432P401R Red LaunchPad - Rev2.0/ LAUNCHXL-CC2640R2 Rev 1.0/ LAUNCHXL-CC1310 Rev 1.4+/CC3220SF-LAUNCHXL Rev B+ CC26X2R1 Rev E/ CC1352R1 Rev E
- A computer running a supported operating system listed in the release notes of corresponding platform SDK(like MSP432 SDK/CC2640R2 SDK)
- An IDE supported by the Plugin:
- FreeRTOSv10.0.0. The SAIL Plugin does not include FreeRTOS sources. User is expected to download the same from www.freertos.org if they want to use FreeRTOS with the Plugin.
3 SAIL Plugin - Download and Installation
3.1 Using the SAIL Plugin Online
A quick and easy way to start working with the SAIL Plugin is to use TI Resource Explorer. This online tool lets you explore the contents of the SAIL Plugin. You can build the examples directly using the cloud version of Code Composer Studio. If you choose to use the SAIL Plugin online, there is no need to download anything to your local computer or install any tools.
3.2 Installing the SAIL Plugin
You can also download the SAIL Plugin from TI Resource Explorer or the software product page on TI’s website.
4. Quick Start for CCS IDE (CCS or GCC Projects)
This section is going to cover the required settings for a CCS installation and how to build and load examples
4.1 Download and Installation
During the installation, the following options are recommended:
- We recommend that you use the default installation folder
Make sure that MSP432 low power + performance MCUs, SimpleLinkTM CC13xx and CC26xx Wireless MCU, SimpleLinkTMCC32x Wireless MCU is selected. You can select additional processor support options as needed.
To use a debug probe, select TI XDS Debug Probe Support and any other options you would like.
4.1.1 Discovering the SAIL Plugin in CCS
SAIL Plugin is a zip package.User can extract the SAIL package to destination of his will, The preferred directory will be - C:\ti
.If user extracts the SAIL package to any other directory then that has to be added to the CCS Product Discovery Path as shown below (optionally user can hit rediscover/install button). After that restart the CCS. CCS will automatically detect the latest install.
4.2 Running Your First Example
This section will show how to import, build and load an example in SAIL Plugin.SAIL Plugin ships pre-built library sail.lib for all combinations of RTOS, compiler and platform supported.It has to be ensured that the sail.lib for the respective platform/rtos/compiler is present in
4.2.1 TI Resource Explorer
A quick and easy way to start working with the SAIL Plugin is to use the TI Resource Explorer. Step by step instructions are available here.
4.2.2 Import via CCS IDE
- Open CCS
- Choose Project → Import CCS Projects from the menu.
- Select the Browse button in the Import CCS Projects dialog and select the the directory
<SAIL_INSTALl_DIR>/examples
- The SAIL Plugin provides TI-RTOS and FreeRTOS based examples. TI-RTOS and FreeRTOS examples have the word "
tirtos" or “freertos” in the project name
CCS discovers both CCS and GCC based examples.
Importing TI-RTOS and FreeRTOS examples will import kernel projects in the same workspace. The kernel project is a dependent project and will be automatically built when the example is built. For more details and how change configurations look at the respective SDK User Guide.
Select any Code Example you would like to use. In this example button_CC3220SF_LAUNCHXL_tirtos_ccs is chosen
- Choose target configuration
- In order to use FreeRTOS within CCS, you must specify the location of the FreeRTOS installation
- Build and Download
5. Quick Start for IAR IDE
This section is going to cover the required settings for a IAR installation and how to build and load examples.
5.1 Download and Installation
Download and install IAR Embedded Workbench for ARM. You can get IAR for ARM here.
- Make sure to select TI XDS as one of the debug probe drivers. You may also select other drivers. The driver will be installed towards the end of the installation of IAR.
5.1.1 Configuring Custom Argument Variables
Before starting to work with any of the projects in the SAIL, you need to load a set of variables that will be set for your current workspace (the custom argument variables file from the SDK of interest is selected):
- Choose Tools -> Configure Custom Argument Variables
- Click Global -> Import
- import the custom argvars from the SDK. The argvars are stored in a SIMPLELINK_MSP432_SDK.custom_argvars file(The path for cusom_argvars change depending on the SDK of interest), which is located in the tools directory of the SDK (
<SDK_INSTALL_PATH>/tools/iar/SIMPLELINK_MSP432_SDK.custom_argvars
)
- You can open (
<SDK_INSTALL_PATH>/tools/iar/SIMPLELINK_MSP432_SDK.custom_argvars
) in a text editor if you need to modify the default path argument variables. - The custom argvars imported from SDK does not contain the SAIL_INSTALL_DIRECTORY, also there may be need to update the paths as per the installation of SDK, xdctools in your system.Please check below figure and make necessary updates to Custom Argument Variables.
- Restart IAR.
5.2 Running Your First Example / Importing Your First project
This section will show how to import, build and load an example
Directly accessing workspace from example folder All Code Examples that are shipped with the SDK come with an IAR workspace. Double-Clicking the specific workspace allows you to open the project on disk and build it.
Browse the example list
In the IAR-IDE go to the
Help
tab and click onInformation Center
In the new
IAR Information Center for ARM
window, click onIntegrated Solutions
Then, click on
Example projects
underTexas Instruments
Then, click on
example applications
linkThis
Examples
page contains information on how to create a new project, and links to import example projectsScroll through the page and click on the project you are interested in. In this example let us click on
- When prompted, click
Yes
to save a copy of the project workspace,No
otherwise If
Yes
, browse to the location where you want to save this workspace. ClickChoose
By default, the project Debug settings is configured for TI XDS110, but the user may change them as needed
- Choose Project > Make
Make/Build the Example Project Make [(Project->Make
) Shortcut F7
]. For RTOS based Projects - Note that the RTOS(kernel) build is a dependent project which is automatically pre-built before the example project builds.
The RTOS kernel(TI-RTOS or FreeRTOS build) project is linked to the workspace but the Example Project is copied into the workspace. SO the RTOS kernel needs to be built only once within the scope of the SDK but each workspace has its own copy of the example project.
For noRTOS Projects - There is not RTOS(kernel) build dependent project imported into the workspace
- Plug in the launchpad and download Click
Project
->Download and Debug
-Shortcut (Ctrl + D)
www.ti.com/lit/pdf/slau574 has more details on IDE specific of MSP432
- Every RTOS example has a README.html that details the Example Application Design Details and how each example works
7. Quick Start for Makefile Users
The SAIL examples and RTOS configuration projects(in the Interested SDK) ship Makefiles in addition to IDE specific projects.There is a makefile available to build the SAIL library also.
7.1 Update imports.mak
- Update the top level
<SDK_INSTALL_DIR>/imports.mak
to point to actual install locations on the user’s machine - Update the top level
<SAIL_INSTALL_DIR>/imports.mak
to point to actual install locations on the user’s machine(Platform specific imports.mak.windows, imports.mak.linux, imports.mak.macos are available, User can replace imports.mak with one specific for platform and then update the paths)
7.2 Build RTOS config
The RTOS config must be built first. The makefile for RTOS config are available in
<SDK_INSTALL_DIR>\kernel\<tirtos/freertos>\builds\MSP_EXP432P401R\<debug/release>\<ccs/gcc/iar>
For example: <SDK_INSTALL_DIR>\kernel\tirtos\builds\MSP_EXP432P401R\release\ccs\makefile
7.3 Build SAIL.lib using makefile
For building Driver library, there is no projectspec available now and one has to manually build using the makefile available for library build. The makefile for building SAIL library is available at <SAIL\_INSTALL\_DIR\>\\source\\ti\\sail
.
use gmake help or make help command to understand the supported targets by the makefile.You should see a help menu similar to this on gmake help or make help
7.3 Build the makefile
- Identify the makefile for the project and build it.
8. Quick Start for TI Resource Explorer Users
User can navigate to the Sensor and Actuator Plugin folder in resource explorer. The sections following will explain on how to use resource explorer and work with the Sensor and Actuator plugin.
Landing page and Documentation folder
The landing page of the Sensor and Actuator plugin in the resource explorer looks as shown below. The image describes various windows/widgets found on the landing page.
The user can click the Documents folder on the left pane/main window to navigate to various documents provided in SAIL plugin. The image below shows the documentation folder contents of the Sensor and Actuator plugin.
Navigating through the Examples
The below image shows examples directory structure.
On navigating through examples and selecting specific example user can see the documentation related to the example. The image below shows this.
More on Examples
Sensor and Actuator Plugin supports multiple SimpleLink Platforms, by navigating through the examples directory user can select the example for different RTOS such as freeRTOS or TIRTOS and he can also select example for specific compiler. After selecting the example the user will be able to launch the example on CCS cloud too. The image below explains this in more detail.
on clicking the import to CCS cloud icon the CCS cloud will be launched and the dependent projects will be imported as shown below (NOTE: importing a project imports example project as well as the project to build the dependent OS). The user can run the example by clicking the run icon as shown in the image. (First time user may have to register, need to have a TI account)