AWS, OTA, PlatformIO, and General Confusion

So I’m attempting to evaluate AWS IoT for a potential project and am just stuck on what to do next. My goal at this point is to get working firmware created using the PlatformIO IDE that can preform a simple OTA Update test using the FreeRTOS Update job. I should also note that I’m using an ESP32-DevKitC for hardware.

I’ve been able to successfully able to run the MQTT connection example on github platformio/platform-espressif32/tree/feature/idf-v4.0/examples/espidf-aws-iot. However, it appears that the esp-aws-iot framework has no included OTA capabilities, so I’m trying to add them to my project manually.

I then created a submodule of the AWS OTA Library and tried to point the CMake file to it like in the example (never used or really heard of submodules before this so it could be an issue):

# The following lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)


I then tried to include ota.h in my main file, but the compiler never finds it and errors out. Project file structure:


platform = espressif32
framework = espidf
board = esp32dev
monitor_speed = 115200

board_build.embed_txtfiles = 

Hi @TrickkStar. You seem to be on the right path. Yes, you are supposed to include otaFilePaths.cmake. However, this will only define CMake variables containing the list of directories but won’t actually include those directories into your main project. To do this, you must set COMPONENT_SRCS and COMPONENT_ADD_INCLUDEDIRS as shown here for your component:

This is a beta version of esp-aws-iot, which has demos that demonstrate how to integrate the AWS OTA Library along with other AWS libraries into the ESP32-DevKitC.