Amazon FreeRTOS
User Guide

OTA Demo Application

Amazon FreeRTOS includes a demo application that demonstrates the use of the OTA library. The OTA demo application is located in the demos\common\ota subdirectory.

This section walks you through using the OTA demo application to perform an over-the-air (OTA) update.

Before you create an OTA update, complete the Getting Started with Amazon FreeRTOS tutorial to make sure you can connect your device to AWS IoT.

The OTA demo application:

  1. Initializes the FreeRTOS network stack and MQTT buffer pool. (See main.c.)

  2. Creates a task to exercise the OTA library. (See vOTAUpdateDemoTask in aws_ota_update_demo.c.)

  3. Creates an MQTT client using MQTT_AGENT_Create.

  4. Connects to the AWS IoT MQTT broker using MQTT_AGENT_Connect.

  5. Calls OTA_AgentInit to create the OTA task and registers a callback to be used when the OTA task is complete.