Amazon FreeRTOS
User Guide

Installing the Initial Firmware

To update firmware, you must install an initial version of the firmware that uses the OTA agent library to listen for OTA update jobs. In these steps, we use the OTA demo application for both the initial firmware and the firmware update.

To download Amazon FreeRTOS and the OTA demo code

  1. Browse to the AWS IoT console and from the navigation pane, choose Software.

  2. Under Amazon FreeRTOS Device Software, choose Configure download.

  3. From the list of software configurations, choose Connect to AWS IoT - TI. Choose the configuration name, not the Download link.


    The OTA Updates feature is currently in beta.

  4. Under Libraries, choose Add another library, and then choose OTA Updates.

  5. Under Name required, type Connect-to-IoT-OTA-TI, and then choose Create and download.

To build the demo application

  1. Extract the .zip file.

  2. Follow the instructions in Getting Started with Amazon FreeRTOS, import the aws_demos project into Code Composer Studio, configure your AWS IoT endpoint, your Wi-Fi SSID and password, and a private key and certificate for your board.

  3. Open aws_demos/application_code/source/aws_demo_runner.c and comment out the call to vStartMQTTEchoDemo() and its extern declaration. Uncomment the call to vStartOTAUpdateDemoTask() and its extern declaration.

  4. Build the project and make sure it compiles without errors.

  5. Run a terminal emulator and connect to your board using the following settings:

    • Baud rate: 115200

    • Data bits: 8

    • Parity: None

    • Stop bits: 1

  6. Run the project on your board to make sure it can connect to Wi-Fi and the AWS IoT MQTT message broker.

The terminal emulator should display text like the following:

Device came up in Station mode Device disconnected from the AP on an ERROR..!! [WLAN EVENT] STA Connected to the AP: Guest , BSSID: <00:00:aa:bb:cc:dd> [NETAPP EVENT] IP acquired by the device Device has connected to <SSID> Device IP Address is <ip-address> 6 2514 [OTA] OTA demo version 0.9.0 7 2514 [OTA] Creating MQTT Client... 8 2514 [OTA] Connecting to broker... 9 2514 [OTA] Sending command to MQTT task. 10 2514 [MQTT] Received message 10000 from queue.

To burn the demo application onto your board

  1. On your Texas Instruments developer board, place the SOP jumper on the middle set of pins (position = 1) and reset the board.

  2. Download and install the TI Uniflash tool.

  3. Start Uniflash and from the list of configurations, choose CC3220SF-LAUNCHXL, and then choose Start Image Creator.

  4. Choose New Project.

  5. On the Start new project page, type a name for your project. Set Device Type to CC3220SF, set Device Mode to Develop, and then choose Create Project.

  6. Disconnect your terminal emulator and choose the Connect button on the right side of the Uniflash application window.

  7. On the left, under Files, choose User Files.

  8. In the File selector pane, choose the Add File icon .

  9. Browse to the /Applications/Ti/simplelink_cc32xx_sdk_1_40_01_00/tools/cc32xx_tools/certificate-playground directory, select dummy-root-ca-cert, choose Open, and then choose Write.

  10. Browse to the working directory where you created the code-signing certificate and private key, choose tisigner.crt.der, choose Open, and then choose Write.

  11. From the Action drop-down list, choose Select MCU Image, and then choose Browse to choose the firmware image to use write to your device (aws_demos.bin). This file is located in the AmazonFreeRTOS/demos/ti/cc3200_launchpad/ccs/Debug directory. Choose Open.

  12. In the file dialog box, confirm the file name is set to mcuflashimg.bin. Select the Vendor check box. Under File Token, type 1952007250. Under Private Key File Name, choose Browse and then choose tisignerkey from the working directory where you created the code-signing certificate and private key. Under Certification File Name, choose tisigner.crt.der, and then choose Write.

  13. In the left pane, under Files, select Trusted Root-Certificate Catalog.

  14. Clear the Use default Trusted Root-Certificate Catalog check box.

  15. Under Source File, choose Browse, select simplelink_cc32xx_sdk_1_40_01_00/tools/certificate-playground\certcatalogPlayGround20160911.lst, and then choose Open.

  16. Under Signature Source File, choose Browse, select simplelink_cc32xx_sdk_1_40_01_00/tools/certificate-playground\certcatalogPlayGround20160911.lst.signed.bin, and then choose Open.

  17. Choose the button to save your project.

  18. Choose the button.

  19. Choose Program Image (Create and Program).

  20. After programming process is complete, place the SOP jumper onto the first set of pins (position = 0), reset the board, and reconnect your terminal emulator to make sure the output is the same as when you debugged the demo with Code Composer Studio.