Open bhusang opened 4 years ago
@bhusang Thanks for trying this out. I briefly checked the branch that you mentioned, looks like espressif has changed a lot of things. I did notice one mistake in their CMake file, if you dig more into this error message,
all Stack (most recent call first):
freertos/vendors/espressif/boards/esp32s2/CMakeLists.txt:467 (idf_build_executable)
freertos/CMakeLists.txt:70 (include)
you can see that in freertos/vendors/espressif/boards/esp32s2/CMakeLists.txt:467
they're using the hardcoded afr executable name, which is either aws_demos
or aws_tests
depending on if we're building demos or tests. I think they should instead use IDF_PROJECT_EXECUTABLE
, which is set by the CMake file in this repo, https://github.com/tgsong/amazon-freertos-examples/blob/8f9c4ce081f85adeabc9fc12d1e3fa977ff5c1be/CMakeLists.txt#L8
Line freertos/vendors/espressif/boards/esp32s2/CMakeLists.txt:467
is not in the master branch, it's the new code they're adding which is breaking this example repo.
@tgsong Thanks for looking into this. I have referenced your comment back to the author of that branch to see how he wants to fix it.
Hi @tgsong,
We have been using this project successfully (big thank you!) to build our application for the ESP32 with AFR. We are now looking at using the ESP32S2. There is a newer branch of amazon-freertos which supports this processor (https://github.com/aws/amazon-freertos/tree/feature/idf_uplevel_v4.2). However, it turns out that it is not straightforward to use that branch with this repo due to differences between esp-idf 3.3 and 4.2. Right off the bat, we are not cmake experts so our ability to fix this is very limited. Second, please refer to this comment (https://github.com/aws/amazon-freertos/pull/2285#issuecomment-676101469) for some more background. It would be very helpful to get a version of the cmake project files that will work with both the newer AFR branch and esp-idf. After some debugging, it seems that the issue is at this level (and not the freertos or esp-idf as they both now build and compile without issues). The command
works fine in the root dir of the freertos (amazon-freertos) repo to build and compile the demo project (without the define for CMAKE_TOOLCHAIN_FILE). But it does not create a successful build setup in this project. The output:
CMakeOutput.log