Amazon FreeRTOS
User Guide

Getting Started with the Texas Instruments CC3220SF-LAUNCHXL

If you do not have the Texas Instruments (TI) CC3220SF-LAUNCHXL Development Kit, visit the AWS Partner Device Catalog to purchase one from our partner.

Important

Before you begin, you need to configure AWS IoT and your Amazon FreeRTOS download to connect your device to the AWS Cloud. See First Steps for instructions.

Throughout this tutorial, the directory path to the Amazon FreeRTOS download is referred to as BASE_FOLDER.

Setting Up Your Environment

Follow the steps below to set up your development environment to get started with Amazon FreeRTOS.

Note that Amazon FreeRTOS supports two IDEs for the TI CC3220SF-LAUNCHXL Development Kit: Code Composer Studio and IAR Embedded Workbench. You can use either IDE to get started.

Install Code Composer Studio

  1. Browse to TI Code Composer Studio.

  2. Download the offline installer for version 7.3.0 for the platform of your host machine (Windows, macOS, or Linux 64-bit).

    Note

    Currently, Amazon FreeRTOS demo code is only compatible with version 7.3.0 of TI Code Composer Studio. Newer versions of Code Composer Studio might cause build errors.

  3. Unzip and run the offline installer. Follow the prompts.

  4. For Product Families to Install, choose SimpleLink Wi-Fi CC32xx Wireless MCUs.

  5. On the next page, accept the default settings for debugging probes, and then choose Finish.

If you experience issues when you are installing Code Composer Studio, see TI Development Tools Support, Code Composer Studio FAQs, and Troubleshooting CCS.

Install IAR Embedded Workbench

  1. Browse to IAR Embedded Workbench for ARM.

  2. Download and run the Windows installer. In Debug probe drivers, make sure that TI XDS is selected:

  3. Complete the installation and launch the program. On the License Wizard page, choose Register with IAR Systems to get an evaluation license, or use your own IAR license.

Install the SimpleLink CC3220 SDK

Install the SimpleLink CC3220 SDK. The SimpleLink Wi-Fi CC3220 SDK contains drivers for the CC3220SF programmable MCU, more than 40 sample applications, and documentation required to use the samples.

Install Uniflash

Install Uniflash. CCS Uniflash is a standalone tool used to program on-chip flash memory on TI MCUs. Uniflash has a GUI, command line, and scripting interface.

Install the Latest Service Pack

  1. On your TI CC3220SF-LAUNCHXL, place the SOP jumper on the middle set of pins (position = 1) and reset the board.

  2. Start Uniflash. If your CC3220SF LaunchPad board appears under Detected Devices, choose Start. If your board is not detected, choose CC3220SF-LAUNCHXL from the list of boards under New Configuration, and then choose Start Image Creator.

  3. Choose New Project.

  4. On the Start new project page, enter a name for your project. For Device Type, choose CC3220SF. For Device Mode, choose Develop, and then choose Create Project.

  5. On the right side of the Uniflash application window, choose Connect.

  6. From the left column, choose Advanced, Files, and then Service Pack.

  7. Choose Browse, and then navigate to where you installed the CC3220SF SimpleLink SDK. The service pack is located at ti\simplelink_cc32xx_sdk_VERSION\tools\cc32xx_tools\servicepack-cc3x20\sp_VERSION.bin.

  8. Choose the Burn ( ) button, and then choose Program Image (Create & Program) to install the service pack. Remember to switch the SOP jumper back to position 0 and reset the board.

Configure Wi-Fi Provisioning

To configure the Wi-Fi settings for your board, do one of the following:

Build and Run the Amazon FreeRTOS Demo Project

Build and Run the Amazon FreeRTOS Demo Project in TI Code Composer

To import the Amazon FreeRTOS demo into TI Code Composer

  1. Open TI Code Composer, and choose OK to accept the default workspace name.

  2. On the Getting Started page, choose Import Project.

  3. In Select search-directory, enter <BASE_FOLDER>\demos\ti\cc3220_launchpad\ccs. The project aws_demos should be selected by default. To import the project into TI Code Composer, choose Finish.

  4. In Project Explorer, double-click aws_demos to make the project active.

  5. From Project, choose Build Project to make sure the project compiles without errors or warnings.

To run the Amazon FreeRTOS demo in TI Code Composer

  1. Make sure the Sense On Power (SOP) jumper on your Texas Instruments CC3220SF-LAUNCHXL is in position 0. For more information, see CC3220 SimpleLink User's Guide.

  2. Use a USB cable to connect your Texas Instruments CC3220SF-LAUNCHXL to your computer.

  3. In the project explorer, make sure the CC3220SF.ccxml is selected as the active target configuration. To make it active, right-click the file and choose Set as active target configuration.

  4. In TI Code Composer, from Run, choose Debug.

  5. When the debugger stops at the breakpoint in main(), go to the Run menu, and choose Resume.

    Note

    The Amazon FreeRTOS demo has 8 debug messages configured.

You can monitor the messages that your device sends to the AWS Cloud with the AWS IoT console's MQTT client.

To subscribe to the MQTT topic with the AWS IoT MQTT client

  1. Sign in to the AWS IoT console.

  2. In the navigation pane, choose Test to open the MQTT client.

  3. In Subscription topic, enter freertos/demos/echo, and then choose Subscribe to topic.

Build and Run Amazon FreeRTOS Demo Project in IAR Embedded Workbench

To import the Amazon FreeRTOS demo into IAR Embedded Workbench

  1. Open IAR Embedded Workbench, choose File, and then choose Open Workspace.

  2. Navigate to <BASE_FOLDER>\demos\ti\cc3220_launchpad\iar, choose aws_demos.eww, and then choose OK.

  3. Right-click the project name (aws_demos), and then choose Make.

To run the Amazon FreeRTOS demo in IAR Embedded Workbench

  1. Make sure the Sense On Power (SOP) jumper on your Texas Instruments CC3220SF-LAUNCHXL is in position 0. For more information, see CC3220 SimpleLink User's Guide.

  2. Use a USB cable to connect your Texas Instruments CC3220SF-LAUNCHXL to your computer.

  3. Rebuild your project.

    To rebuild the project, from the Project menu, choose Make.

  4. From the Project menu, choose Download and Debug. You can ignore "Warning: Failed to initialize EnergyTrace," if it's displayed. For more information about EnergyTrace, see MSP EnergyTrace Technology.

  5. When the debugger stops at the breakpoint in main(), go to the Debug menu, and choose Go.

    Note

    The Amazon FreeRTOS demo has 8 debug messages configured.

You can monitor the messages that your device sends to the AWS Cloud with the AWS IoT console's MQTT client.

To subscribe to the MQTT topic with the AWS IoT MQTT client

  1. Sign in to the AWS IoT console.

  2. In the navigation pane, choose Test to open the MQTT client.

  3. In Subscription topic, enter freertos/demos/echo, and then choose Subscribe to topic.

Troubleshooting

If you don’t see messages in the MQTT client of the AWS IoT console, you might need to configure debug settings for the board.

To configure debug settings for TI boards

  1. In Code Composer, on Project Explorer, choose aws_demos.

  2. From the Run menu, choose Debug Configurations.

  3. In the navigation pane, choose aws_demos.

  4. On the Target tab, under Connection Options, choose Reset the target on a connect.

  5. Choose Apply, and then choose Close.

If these steps don’t work, look at the program's output in the serial terminal. You should see some text that indicates the source of the problem.

For general troubleshooting information about Getting Started with Amazon FreeRTOS, see Troubleshooting Getting Started.