AWS IoT CC32XX Quick Start Guide
Table of Contents
Introduction
This guide is intended to assist users in the initial setup and demonstration of a CC32XX AWS application using the CC32XX Plugin for AWS. The guide explains how to configure the boards, compile the software artifacts, program the CC32XX device, set up your AWS account and run an AWS application.
Hardware Requirements
- TI CC3220SF (Secure Flash) and/or TI CC3220S (Secure) LaunchPad
- TI CC3235SF (Secure Flash) and/or TI CC3235S (Secure) LaunchPad
Software Requirements
- TI SimpleLink Wi-Fi CC32XX Software Development Kit (SDK), v2.40 or compatible
- A computer running a supported operating system listed in the Release Notes
- At least one of the following IDEs supported by the SimpleLink CC32XX SDK:
- FreeRTOSv10.0.0 (Optional)
- If the User wants to use FreeRTOS with the SDK, the user is expected to download the FreeRTOS sources from www.freertos.org
- Please refer to the SimpleLink CC32XX SDK documentation for more information about setting up FreeRTOS
Installing CC32XX Plugin for AWS in CCS
- Download and open the CC32XX Plugin for AWS Installer (replace x’s with version number):
- Windows: aws_cc32xx_2_20_xx_xx.exe
- Linux: aws_cc32xx_2_20_xx_xx.run
- Note: If you have downloaded a zip file of the Plugin, then you should simply unzip it using your favorite unzip tool. The location you choose to unzip it to will be the installation directory (
AWS_INSTALL_DIR
).
Select an installation directory. This will be referred to as
AWS_INSTALL_DIR
in the rest of this document. It’s recommended that you install it in your CCS installation directory (default c:/ti) so it can be discovered automatically.Click Next > and finish the installation
Open CCS (close and re-open if already running) and you should see the Install Discovered Products window
Select the CC32XX Plugin for AWS and click Install
Hardware Setup
Jumper settings
The SOP[2…0] jumpers are used to set different flash programming modes/states.
SOP[2…0] mode ‘100’ is used for programming the serial flash with the application binary and/or the service pack. After flashing, the board should be reset and the mode set to ‘000’ (no jumpers in place) to run/execute the contents of flash
SOP[2…0] mode ‘010’ is the flash and execute mode which is similar to the ‘100’ mode except that after flashing, the contents of flash are executed immediately without having to reset or remove all jumpers. This mode is also used when using the CCS to connect to the device for loading and debugging
Setting up a serial terminal
Plug the CC32XX Launchpad into a USB port on your PC.
Open a serial session to the appropriate COM port with the following settings:
Baudrate: 115200 Data bits: 8 Stop bits: 1 Parity: None Flow Control: None
The output of the examples will be displayed in the terminal.
AWS IoT Developer Setup
In order to run the example applications, it is necessary to complete the steps of the AWS IoT Developer Guide. In particular, the following steps of the guide must be completed:
- Create and Activate a Device Certificate
- Make sure you choose to download the certificate files, as these will be needed when setting up the examples.
- Note: you will also need a root CA certificate. You can download the root CA from here.
Note that Amazon has recently tailored the AWS IoT Developer Guide instructions specifically for the “AWS IoT Button.” You can ignore the mentions of the button, as your TI embedded device will be used in place of this. For more details on AWS IoT, please refer to the What Is AWS IoT page.
Building and running Examples in CCS
Several examples are provided in the CC32XX Plugin and can be found in the examples/
subdirectory. These steps refer to the subscribe_publish_sample
application for the CC3220SF device, but the same procedure applies to other examples, as well.
It is assumed that the CC32XX SDK has already been installed in a directory we will refer to as
CC32XX_SDK_INSTALL_DIR
. You should install it if you have not already done so, as the CC32XX Plugin for AWS depends on the CC32XX SDK.Open Code Composer Studio.
In CCS, import the
subscribe_publish_sample
by first selecting File > Import…In the Import window, select C/C++ > CCS Projects and hit the Next button
In the Import CCS Eclipse Projects window, hit the browse button to browse to the location corresponding to
AWS_INSTALL_DIR\examples\rtos\CC3220SF_LAUNCHXL\aws\subscribe_publish_sample
. Select the checkbox next to thesubscribe_publish_sample
for TIRTOS (or FreeRTOS) for CCS (or GCC) and hit the Finish button.
Two projects should appear in the Project Explorer tab in CCS: one for the
subscribe_publish_sample
example itself, and another which corresponds to the OS chosen.Update the example to use the proper certificates, AWS account and WiFi Access Point information, as specified in the section Example Pre-Build Steps
- If TIRTOS is your OS, you can simply right-click on the
subscribe_publish_sample
project, and select Build Project to build.
- If you are using FreeRTOS for your OS, you need to set the installation directory of FreeRTOS before building:
- In CCS, select Window > Preferences
- Navigate to Code Composer Studio > Build > Variables
- Click Add
- For Variable name, enter
FREERTOS_INSTALL_DIR
- For Type, select directory
- For Value, enter the installation directory of FreeRTOS
- Hit OK until you get back to the main window in CCS
- To build the
subscribe_publish_sample
project, right-click on it, and select Build Project.
Setting Up Code Composer Studio Before Running The Examples
In Code Composer Studio, open the CCS Debug Perspective - Windows menu > Open Perspective > CCS Debug
Open the Target Configurations View - Windows menu > Show View > Target Configurations
Right-click on User Defined. Select New Target Configuration.
Use
CC3220.ccxml
as “File name”. Hit Finish.In the Basic window, select “Texas Instruments XDS110 USB Debug Probe” as the “Connection”, and then type “CC3220” in the “Board or Device” text field. Check the box next to “CC3220SF” or “CC3220S” (depending on your launchpad). Hit Save.
Right-click “CC3220.ccxml” in the Target Configurations View. Hit Launch Selected Configuration.
Under the Debug View, right-click on “Texas Instruments XDS110 USB Debug Probe_0/Cortex_M4_0”. Select “Connect Target”.
Running an Example in CCS
Ensure that your CC32XX device is connected in CCS.
Select Run > Load > Load Program…, and browse to the file
subscribe_publish_sample_CC3220SF_LAUNCHXL_tirtos_ccs.out
, found in your project. Hit OK. This will load the program onto the board. (The same procedure applies to other examples by substitutingsubscribe_publish_sample
with the name of the example you are working with)Run the application by pressing F8. The output will appear in your serial terminal session:
startSNTP: Current time: Tue Aug 7 19:28:11 2018 CC32XX has connected to AP and acquired an IP address. IP Address: 192.168.1.131 AWS IoT SDK Version 3.0.1- Connecting... Subscribing... -->sleep Subscribe callback sdkTest/sub hello from SDK QOS1 : 1 Subscribe callback sdkTest/sub hello from SDK QOS0 : 0 -->sleep
Building and running Examples in IAR
Download and Installation of IAR
For instructions on downloading and setting up IAR properly for use with the CC32XX SDK, please refer to the Quick Start Guide document that is included in the SimpleLink CC32XX SDK. As part of the procedure, make sure to import the custom argvars for the SDK.
Configuring the IAR environmental variables for the AWS IoT SDK
Before starting to work with any of the AWS example projects in the SDK, you need to load a set of environment variables that will be set to your current workspace (custom argvars), in addition to the ones from the SDK.
The custom argvars can be found at
<AWS_INSTALL_DIR>/tools/iar/AWS_CC32XX_SDK.custom_argvars
. If you need to modify the default path argument variables, edit the variables to correct the paths.
Open the IAR IDE
Choose Tools > Configure Custom Argument Variables
Click Global > Import
Browse to
<AWS_INSTALL_DIR>/tools/iar
. Import the custom argvars from the Plugin.Restart IAR
Importing your First Project
You can choose to open an Example Project by either directly accessing the Example workspace (by double clicking on it), or by importing the Example from the Example List in the IDE.
Directly accessing an Example from the 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. Be sure to update the example to use the proper certificates, AWS account and WiFi Access Point information, as specified in the section Example Pre-Build Steps
Importing an Example in 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 on Integrated Solutions
Scroll down and choose Texas Instruments - Example projects