Add UART part to existing AWS Project

Hi,

I’ve done the Getting Started with https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html and have a MQTT connection up and running with the AWS cloud.

Now I just want to add the functionality/defines from Espressif ESP-IDF UART part into the AWS demo MQTT project.
I just don’t know how to do it?

I’m running Windows 10.

Hello @abcde

Thanks for contacting us. Great to hear that you could get MQTT connection working. Can you please elaborate on which ‘Espressif ESP-IDF UART part’ are you trying add to the demo project ?
It will be helpful to know exactly what are are you trying build so that we can help. Note: ESP project uses cmake and if you want add files , you will have change cmake files.
Thanks!

Hi,

The needed functions and defines are in the uart.c and all depending support files (such as the include files in uart.c and deeper).

How do I “lift” them into my AWS demo project?

These steps are to be done?

  1. Copy all needed files to some sub folder(s) in my AWS demo project.
  2. Change/create needed CMakeLists.txt files.
  3. Run cmake or cmake-gui to Configure and Generate needed build files.
  4. Run ninja to compile.
  5. Flash and execute.

For me the tricky parts are the two first points above.

Does anyone know how to add esp-idf components?

Hello abcde,

You can add new components from idf.py by modifying the CMakeLists.txt at this location. https://github.com/aws/amazon-freertos/blob/a6a459b5e498f92db5ab16d6bf69f8d449d8c8e9/vendors/espressif/boards/esp32/CMakeLists.txt#L93.

The UART code is already within the repository, so you do not have to copy any new files. You will likely have to enable the ringbuf component as it is a dependency of the Espressif UART driver.