SimpleLink SDK Wi-Fi Plugin Quick Start Guide
Table of Contents
- Introduction
- Prerequisites
- Out of Box Experience
- Updating Servicepack / System files on the CC31xx
- QuickStart for CCS IDE ( CCS or GCC Projects )
- QuickStart for IAR IDE
- Quick Start for Makefile Users
- Quick Start for Linux Users
- Updating Installation Paths
- Building Kernel Configuration
- Building Core Libraries
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 get started with the SimpleLink SDK Wi-Fi Plugin.
Prerequisites
The user is expected to have the following:
Hardware
- SimpleLink Wi-Fi CC31xx BoosterPack:
- Host microcontroller such as:
- CC31xx Emulator BoosterPack
- A computer running Microsoft Windows, Linux or MacOS
Software
Check the release notes for supported versions of all software.
- At least one of the following IDEs supported by the SDK:
- FreeRTOS (Optional)
- This package does not deliver FreeRTOS source. Users should download the FreeRTOS sources from www.freertos.org
- Uniflash to create and write programming images
Out of Box Experience
To get started with the CC31xx and learn more about your device, check out the CC3120 Out of Box Experience or the CC3135 Out of Box Experience on the SimpleLink Academy training platform!
Updating Servicepack / System files on the CC31xx
It is recommended to update the servicepack to the latest available. The servicepack can be found in the SDK at the following path - <SDK_INSTALL_DIR>/tools/cc31xx_tools/servicepack-<device>
Uniflash ImageCreator and Programming Tool
Download and install Uniflash
Uniflash ImageCreator User Guide: SWRU469
QuickStart for CCS IDE ( CCS or GCC Projects )
Download and Installation
Download Code Composer Studio
During the installation, select following options:
- We recommend that you use the default installation folder
- SimpleLink CC3xxx Wireless MCUs must be 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.
Add CCS Support for FreeRTOS
- Download FreeRTOS official version 10
- Install the software under c:
- Run CCS
- Choose Window > Preferences > Code Composer Studio > Build > Variables > Add
- Fill the Variable name field with FREERTOS_INSTALL_DIR
- Change the type to directory
- Change the Value to the
<FREERTOS_INSTALL_PATH>
and them press OK
Products Settings Verification
Choose Window > Preferences > Code Composer Studio > products
- Check that the paths in Product Discovery Path include the paths of:
- SDK Install path
- XDCtools
- If not, choose Add, add the paths and then choose Rediscover, after the rediscover a Install Discovered Products windows may appear.
if the window appear it means that new products have been discovered, if the products mentioned above are in the list, choose them and choose install.
Execute your First Application
This section will show how to import/build/load an example
TI Resource Explorer
A quick and easy way to start working with the SDK is to use the TI Resource Explorer on dev.ti.com/tirex.
Import via CCS IDE
- Open CCS
- Choose Project → Import CCS Eclipse Projects from the menu.
Select the Browse button in the Import CCS Eclipse Projects dialog and select the the directory
<SDK_INSTALL_DIR>/examples
The SDK provides NoRTOS, TI-RTOS and FreeRTOS based examples. TI-RTOS and FreeRTOS examples have the word “tirtos” or “freertos” in the project name
Select a host MCU platform. Some supported LaunchPads in the SDK plugin contain different examples.
CCS can support both CCS and GCC based examples.
Importing TI-RTOS and FreeRTOS examples will also import a kernel projects in the same workspace. The kernel project is a dependent project and will be automatically built when the example is built. Importing a NoRTOS examples will import only the example project linked to a pre-compiled NoRTOS kernel library.
Select any code example you would like to use and select finish.
Build the project. The RTOS build for the first time takes a couple of minutes. To load the application to your host MCU LaunchPad, plug in your launchpad, and click the Debug button.
The XDS110 may require a firmware update. If a firmware update is requested, click Update.
Application Example Guide
- Every example has a README.html that provides details on the example and how to use it.
QuickStart for IAR IDE
Download and Installation
Download and install IAR Embedded Workbench for ARM
Be 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.
Configuring the environmental variables
Before starting to work with any of the projects in the SDK, you need to load a set of environment variables that will be set to your current workspace (Custom argvars)
The custom argvars can be found at
<SDK_INSTALL_PATH>/tools/iar/simplelink_sdk_wifi_plugin_<Host MCU>.custom_argvars
, if you need to modify the default path argument variables, edit the variables with the correct pathsChoose Tools -> Configure Custom Argument Variables
Click Global->Import
Browse to
<SDK_INSTALL_PATH>/tools/iar
, import the custom argvars from the SDK.
Restart IAR.
Download and install XDS Emulation Software Package
Download the latest XDS software Emulation package from here: Make sure IAR\CCS are closed during installation process.
Execute your First Application
This section will show how to import/build/load an example.
Build your Kernel
For this release of the SDK, the RTOS (FreeRTOS/TIRTOS) configurations may not be pre-built. You will need to build the desired configurations.
Update your installation Paths
- In order to update your installation paths, follow the Updating Installation Paths section of the quick start guide.
Build your Kernel Configuration
- In order to build the kernel, follow the Building Kernel Configuration section which uses make files or continue with this paragraph which explains how to compile the Kernel project using IAR IDE.
Build your Core Libraries
- In order to build the Host Driver, OTA, and Network Services libraries, follow the Building Core Libraries section of this document.
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
IAR Information Center for ARM
window, click onIntegrated Solutions
Scroll down and choose Texas Instruments - Example projects
Click on the example applications link.
All the example projects in the SDK that available in IAR are listed in the html page.
Scroll through the page and click on the project you are interested in. In this example we choose to work with network_termianl for the CC3220S based on FreeRTOS.
- When prompted, click
Yes
to save a copy of the project workspace in a specific folder,No
will save the workspace in a default folder. After clicking
Yes
, browse to the location where you want to save this workspace. ClickChoose
When importing any example, the related kernel project will be imported automatically
- In order to create a binary image in addition to an .out file follow the next steps:
right click on the
project name --> options
On the output converter tab (Highlight in blue), mark the checkbox (in yellow), and change the output format to binary.
Now, hit OK, and later compile. The binary image should reside in:
<your_IAR_workspace>\<IAR_Project location>\Debug\Exe
.
In order to compile the example and the kernel projects, 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.
For noRTOS Projects - There is not RTOS(kernel) build dependent project imported into the workspace
Run a debug session
- Select Project -> options from the menu, and select the Debugger category.
By default, the project Debug settings is configured for TI XDS110, but the user may change them as needed
- Go to the TI XDS Category, the settings should be TI XDS110 Emulator as the emulator, and JTAG (4-pin) as the interface
You can override the path for code composer studio base according to the code composer installation path.
Quick Start for Makefile Users
The kernel projects, core libs and SDK examples ship makefiles in addition to IDE specific projects.
Update your installation paths
- In order to update your installation paths, follow the Updating Installation Paths section of this quick start guide.
Build Kernel configuration
- In order to build the kernel, follow the Building Kernel Configuration section.
Build Core Libraries
- In order to build the Host Driver, OTA, and Network Services libraries, follow the Building Core Libraries section.
Build the project
- Identify the makefile for the project and build it.
For Example<SDK_INSTALL_DIR>/examples/rtos/CC3220SF_LAUNCHXL/demos/network_terminal/freertos/gcc
Quick Start for Linux Users
When using Linux machine the installation steps for the SDK and IDE’s are the same as in windows.
Quick Start for CCS IDE can be found in QuickStart for CCS IDE paragraph.
Quick Start for Makefile Users can be found in Quick Start for Makefile Users paragraph.
Note: When using Makefile in Linux machine, instead of using the gmake command, just use make.
For Example:
Updating Installation Paths
The imports.mak file is provided in the top-level directory of the SDK installation.
This file specifies where XDCTools, FreeRTOS, host MCU SDKs, and all compiler tools are installed. The user can update the search paths defined in this file to point to the correct installation directories on the user’s machine.
Building Kernel Configuration
Building the Kernel can be done in different options according to the requirements.
The User’s Guide provides details about the various RTOS configuration options. Here is a quick summary in this section
Open a command prompt. Any Kernel configuration can be built by navigating to the desired directory and running gmake command which is a part of the XDC tools package.
To build all the NoRTOS, TIRTOS and FreeRTOS config projects
cd <SDK_INSTALL_PATH>\kernel
<XDCTOOLS_INSTALL_PATH>\gmake.exe
To build only TIRTOS config project
cd <SDK_INSTALL_PATH>\kernel
Debug:
<XDCTOOLS_INSTALL_PATH>\gmake.exe tirtos-debug
Release:
<XDCTOOLS_INSTALL_PATH>\gmake.exe tirtos-release
To build only FreeRTOS config project
cd <SDK_INSTALL_PATH>\kernel
Release:
<XDCTOOLS_INSTALL_PATH>\gmake.exe freertos-release
To build only NoRTOS config project
cd <SDK_INSTALL_PATH>\kernel
Release:
<XDCTOOLS_INSTALL_PATH>\gmake.exe nortos-release
To build only specific config project
cd <SDK_INSTALL_PATH>\kernel\<OS>\builds\<Board variant>\<release or debug>\<Compiler>
<XDCTOOLS_INSTALL_PATH>\gmake.exe
Building Core Libraries
The SDK includes Host Driver, OTA, and Nework Services libraries that can be compiled after source changes.
To build Host Driver library
cd <SDK_INSTALL_PATH>\source\ti\drivers\net\wifi
Release:
<XDCTOOLS_INSTALL_PATH>\gmake.exe DRIVER_PLATFORM=m4f
To build OTA library
cd <SDK_INSTALL_PATH>\source\ti\net\ota
Release:
<XDCTOOLS_INSTALL_PATH>\gmake.exe DRIVER_PLATFORM=m4f
To build all Network Services library
cd <SDK_INSTALL_PATH>\source\ti\net
By default the makefile builds all NS libraries:
all: @ echo building packages … @ $(XDC) XDCARGS=“$(XDCARGS)” XDCPATH=“$(XDCPATH)” all -PR .
clean: @ echo cleaning packages … @ $(XDC) XDCARGS=“$(XDCARGS)” XDCPATH=“$(XDCPATH)” clean -PR .
Release:
<XDCTOOLS_INSTALL_PATH>\gmake.exe
To build a specific NS lib (ex: MQTT)
cd <SDK_INSTALL_PATH>\source\ti\net
Moidfy the following lines of the makefile to specifiy MQTT as the package to build:
all: @ echo building packages … @ $(XDC) XDCARGS=“$(XDCARGS)” XDCPATH=“$(XDCPATH)” all -P mqtt
clean: @ echo cleaning packages … @ $(XDC) XDCARGS=“$(XDCARGS)” XDCPATH=“$(XDCPATH)” clean -P mqtt
Release:
<XDCTOOLS_INSTALL_PATH>\gmake.exe