-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ESP-IDF release v4.2 upgrade and support for ESP32-S2 #2285
ESP-IDF release v4.2 upgrade and support for ESP32-S2 #2285
Conversation
6d976b0
to
e3da164
Compare
Hello Shubham, Please let me know if I can assist you in getting this merged. Thanks, Carl |
Hi @lundinc2, Can you please help resolve build failures with this PR? Thanks |
Hello @shubhamkulkarni97, Sorry for the delay. I have begun preparations for updating our environment. Could you separate this PR into two different ones? One for the IDF change and one for the new board? I'll make sure to cherry-pick the kernel changes into our kernel convergence branch. Thanks, Carl |
Hi @lundinc2, ESP32-S2 support is based on IDF v4.2 release. Thanks, |
Hi @lundinc2, Can you please help with review and merge for this PR? Thanks, |
This is ready, I am still waiting on a decision regarding the new board. Sorry for the delay. |
Hello, Please resolve the merge conflicts in this PR. |
e3da164
to
5697615
Compare
@yourslab Have resolved merge conflicts and rebased branch to latest master. |
@shubhamkulkarni97 we will host this as a feature branch for now, while the v4.2 beta is ongoing. I created a feature branch based of this PR here: https://github.com/aws/amazon-freertos/tree/feature/idf_uplevel_v4.2. Please let me know if you have any questions / feedback. If not I'll close this this PR for now. |
Hi @lundinc2, our intention was of merging these changes to master branch. We have run entire qualification tests for both the boards with IDT v3.0 and no failures were observed.
I'm also attaching DQP results for both the boards. Note: For sanity we have also run DQP for ESP32-S2 with IDT v3.1 (latest version). ESP32_DQP.zip There is one test failure in both the results due to network issue. It would be great if we can merge this PR. Please let me know your views on this. Thanks, |
@shubhamkulkarni97 (sorry for the long message and apologies if this is not the correct place to raise this issue) While I would really appreciate this pull request being merged to fully support the ESP32S2, I seem to have a problem with building against this particular branch. Here's what I did:
|
Hi @bhusang,
This print shows that
This print shows that
Xtensa toolchain version also seems correct. Project configuration is also correct, can you try running following commands to run the application:
Hope this helps. Thanks, |
Thanks for the feedback. I think that the open issues are as follows:
CMake Error at /Users/bgupta/src/LeakSentinel/esp/compare/amazon-freertos/vendors/espressif/esp-idf/tools/cmake/build.cmake:468 (set_property): Even if I use the command that you suggest: CMake Error at /Users/bgupta/src/LeakSentinel/esp/compare/amazon-freertos/vendors/espressif/esp-idf/tools/cmake/build.cmake:468 (set_property): |
Some more (hopefully helpful) feedback, the cmake file here: has the following section: where exe_target is set to aws_demos. Line 467 of the same file calls idf_build_executable(${exe_target}) which requires aws_demos to be a valid target in vendors/espressif/esp-idf/tools/cmake/build.cmake but this is not the case. Bottom line, as far as I can tell, I cannot build an executable using this branch. I am likely doing something wrong but I was able to build for the standard esp32 using this strategy before. All I did was to move to this branch and update the esp-idf version and corresponding tools appropriately. |
@bhusang, We have pushed a tag, fetching the branch again should solve the issue. In the logs provided above, there is issue with toolchain and toolchain path:
Here esp32-s2 specific toolchain should be used. Can you try running Also, can you verify cmake version? |
Ok, I started with a clean environment and carefully ran the commands (and logged the results in the attachment). The compilation still fails with the same error as above. In the attachment, I describe the steps including verifying tool versions. Please take a look as I would appreciate your feedback to solve the problem and allow me to compile successfully for the ESP32S2 target in the AFR repo. |
I am encountering the same issue, using this branch compiling for esp32 is also failing on target aws_demo not found |
@bhusang @YTvW , I checked Can you try running I also think some commands are missing while setting up the environment. Can you follow steps mentioned below:
Note: Environment set up using Thanks, |
You instructions worked well when building in the amazon-freertos dir. So thank you for the instructions. Now on to the getting the amazon-freertos-examples repo to work for the ESP32S2. Thanks. |
Thanks for putting this PR up, it's very helpful. While I've succeeded in building the amazon freertos ESP32 demo projects with ESP-IDF v4.2, it doesn't work as well when using amazon-freertos as a library in another project. I've created a simple repo to demonstrate the issue here. The error message is as follows: I'm not yet sure what's causing the issue but it would be great if we get closer to fixing this as I'd really like to use the latest IDF version with the amazon freertos. Thanks. |
Ok, @tgsong has given some feedback that the issue might very well be in the CMakeLists.txt that you have in the esp32s2 directory. Please take a careful look at this comment: tgsong/amazon-freertos-examples#6 (comment) Could we modify vendors/espressif/boards/esp32s2/CMakeLists.txt like this?
I agree with @Rjblaauboer that the instructions (https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html) "Using FreeRTOS in your own CMake project for ESP32" need to be also correct for the esp32s2 branch to be useful. I think that the issue is back to you to take a good look at. |
@bhusang @shubhamkulkarni97
And as far as I can tell both Btw, after this fix I had to fix a bug in the python requirements because of the following bug: espressif/esp-idf#5782 (comment) Thanks. |
system Remove linker flags from toolchain specific files iot_wifi.c: Use esp_netif APIs Fix warnings in WiFi port layer Change smartconfig implementation extras.c: Add stack overflow hook in freertos component Remove secure_sockets layer in ports directory and use AFR secure_socket layer iot_pkcs11_pal.c: Change ESP_LOGx to ESP_EARLY_LOGx in initialize_nvs_partition
…source code in app_update component
Add mbedtls specific config options in sdkconfig.defaults Disable ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER in sdkconfig to fix IP issue with WiFi reconnection Sync freertos component Kconfig with IDF Update linker fragment for freertos component Update sdkconfig.defaults to disable GCC8 warnings and remove corresponding CFLAGS from Makefile
all boards. Remove mbedTLS port files and use ESP-IDF provided files. Changes in CMakeLists for mbedTLS to support ESP32-S2.
5697615
to
e0dad44
Compare
Hi @bhusang @YTvW @Rjblaauboer, apologies for late response. I have updated this branch to fix issues when using freertos in external CMake project. To use this branch with external CMake project, some changes are also required in build system of external project. I have pushed feature/idf_v4.2 branch in fork of For now, I'll close this PR as support for common-io needs to be added with ESP-IDF v4.2. You can use I'll reopen this PR when changes can be merged to master. Hope this helps for you! Thanks, |
Could you please make a new PR when you are ready? Thank you! |
@sarenameas, I'll create a new PR when the changes are ready and beta tag is available for ESP-IDF v4.2. |
Description
Note: ESP-IDF v4.2 release requires updated toolchain (
xtensa-esp32-elf-gcc 8.2.0
) and is not compatible with older toolchain used in Amazon FreeRTOS(xtensa-esp32-elf-gcc 5.2.0
).Steps to update the toolchain:
1. Navigate to esp-idf directory (
cd ./vendors/espressif/esp-idf
)2. Run install.sh script which installs required tools (
./install.sh
)3. Run export.sh to add required tools to environment PATH (
. ./export.sh
)To verify toolchain version, please run
xtensa-esp32-elf-gcc --version
.Output should look like:
Command to build application for ESP32-S2:
cmake -DVENDOR=espressif -DBOARD=esp32s2_saola_1 -DCOMPILER=xtensa-esp32s2 -S . -B build -GNinja
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.