Thank you for your answer, but I am not completely sure what you want me to do.
- I followed the README instructions from the blink example and I builded it successfully within a seperate pio project in an arduino framework - was this what you wanted me to do?
-
then add the esp-aws-iot component
Well I was not sure what you meant by that either but I checked the documentation and found the example I think you wanted me to find:
# 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.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
list(APPEND EXTRA_COMPONENT_DIRS esp-aws-iot)
project(subscribe_publish)
Since my project is in the arduino framework, there are no CMakeLists, so I added the espidf framework and I do have two frameworks now: framework = arduino, espidf
After that I copied the esp-aws-iot folder to my project following the instrcution from the documentation and added the lines from above into my CMakeLists.txt file in the src-folder:
Using EXTRA_COMPONENT_DIRS
option in the root CMakeLists.txt
file. This option represents a list of extra directories to search for components.
I tried building the blink example again but CMake is throwing some errors - here is the terminal output:
Warning! Arduino framework as an ESP-IDF component doesnât handle the variant
field! The default esp32
variant will be used.
Reading CMake configurationâŚ
â Project is not inside a git repository, or git repository has no commits; will not use âgit describeâ to determine PROJECT_VER.
â Building ESP-IDF components for target esp32
â Found Git: C:/Program Files/Git/cmd/git.exe (found version â2.29.2.windows.1â)
â Configuring incomplete, errors occurred!
See also âC:/0_GithubRepos/ESP-IDF/.pio/build/firebeetle32/CMakeFiles/CMakeOutput.logâ.
fatal: not a git repository (or any of the parent directories): .git
CMake Error at .pio/build/firebeetle32/CMakeFiles/git-data/grabRef.cmake:48 (file):
file failed to open for reading (No such file or directory):
C:/0_GithubRepos/ESP-IDF/.pio/build/firebeetle32/CMakeFiles/git-data/head-ref
Call Stack (most recent call first):
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:80 (include)
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:90 (get_git_head_revision)
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/project.cmake:59 (git_describe)
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/project.cmake:380 (__project_get_revision)
CMakeLists.txt:3 (project)
CMake Error at C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/component.cmake:219 (message):
CMake Warning (dev) at
.pio/build/firebeetle32/build_properties.temp.cmake:8:
Syntax Warning in cmake code at column 51
Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/scripts/component_get_requirements.cmake:3 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
fatal: Needed a single revision
fatal: Needed a single revision
CMake Error at
C:/Users/wes39504/.platformio/packages/tool-cmake/share/cmake-3.16/Modules/ExternalProject.cmake:1029
(define_property):
define_property command is not scriptable
Call Stack (most recent call first):
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/kconfig.cmake:1 (include)
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/idf.cmake:41 (include)
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/project.cmake:12 (include)
src/CMakeLists.txt:5 (include)
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/scripts/component_get_requirements.cmake:106 (include)
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/scripts/component_get_requirements.cmake:124 (__component_get_requirements)
Call Stack (most recent call first):
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/build.cmake:488 (__component_get_requirements)
C:/Users/wes39504/.platformio/packages/framework-espidf/tools/cmake/project.cmake:384 (idf_build_process)
CMakeLists.txt:3 (project)
So I am quite sure this is not want you wanted me to do, but maybe you could elaborate what I could do to use the library in my current arduino framework based pio project.