Page 1 of 1

Using different ESP-IDF versions

Posted: Mon Dec 19, 2022 3:28 pm
by MateusGL
Hi,

I'm trying to use different ESP-IDF versions inside Espressif IDE v2.5.0.

At the moment, to change the ESP-IDF version I go to "Espressif -> Download and Configure ESP-IDF" and select the version.

The problem is that projects already in the workspace stay in a broken state, trying to use the older toolchain, as shown in the third line in the log below (-DCMAKE_TOOLCHAIN_FILE arg). This log was produced after changing the ESP-IDF version from 4.4 to 5.0.

To solve that, I need to delete the project build folder, delete the project from workspace, checking the "Delete all related configurations" box, and reimport the project. After that, the compilation is successfull, with the new ESP-IDF version.

Is there a better way to do that? Is it possible to edit the project configurations manually to change the toolchain, without being necessary to remove and reimport the project?

Thank you!
Building in: C:\Users\Mateus\Desktop\projetos_teste\project_5_0\build
Configuring in: C:\Users\Mateus\Desktop\projetos_teste\project_5_0\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Espressif\frameworks\esp-idf-v4.4\tools\cmake\toolchain-esp32s3.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32s3 C:\Users\Mateus\Desktop\projetos_teste\project_5_0
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.37.1.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 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 esp32s3
-- Checking Python dependencies...
Constraint file: C:\Espressif\espidf.constraints.v5.0.txt
Requirement files:
- C:\Espressif\frameworks\esp-idf-v5.0\tools\requirements\requirements.core.txt
Python being checked: C:\Espressif\python_env\idf5.0_py3.10_env\Scripts\python.exe
Python requirements are satisfied.
-- Project sdkconfig file C:/Users/Mateus/Desktop/projetos_teste/project_5_0/sdkconfig
CMake Warning at C:/Espressif/frameworks/esp-idf-v5.0/tools/cmake/crosstool_version_check.cmake:8 (message):
Toolchain
C:/Espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe
version 8.4.0 is not the supported version 11.2.0. Check Getting Started
documentation or proceed at own risk.

Call Stack (most recent call first):
C:/Espressif/frameworks/esp-idf-v5.0/components/esp_common/project_include.cmake:6 (gcc_version_check)
C:/Espressif/frameworks/esp-idf-v5.0/tools/cmake/build.cmake:380 (include)
C:/Espressif/frameworks/esp-idf-v5.0/tools/cmake/build.cmake:599 (__build_process_project_includes)
C:/Espressif/frameworks/esp-idf-v5.0/tools/cmake/project.cmake:440 (idf_build_process)
CMakeLists.txt:10 (project)


CMake Error at C:/Espressif/frameworks/esp-idf-v5.0/tools/cmake/crosstool_version_check.cmake:37 (message):
-- Configuring incomplete, errors occurred!
See also "C:/Users/Mateus/Desktop/projetos_teste/project_5_0/build/CMakeFiles/CMakeOutput.log".


Toolchain:
C:/Espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe,
crosstool-ng version esp-2021r2-patch2 doesn't match supported version
esp-2022r1

Please try to run 'idf.py fullclean' to solve it quickly.

Check Getting Started documentation if the error continues.

You can override this error and proceed with build by defining the
IDF_MAINTAINER environment variable.

Call Stack (most recent call first):
C:/Espressif/frameworks/esp-idf-v5.0/components/esp_common/project_include.cmake:7 (crosstool_version_check)
C:/Espressif/frameworks/esp-idf-v5.0/tools/cmake/build.cmake:380 (include)
C:/Espressif/frameworks/esp-idf-v5.0/tools/cmake/build.cmake:599 (__build_process_project_includes)
C:/Espressif/frameworks/esp-idf-v5.0/tools/cmake/project.cmake:440 (idf_build_process)
CMakeLists.txt:10 (project)


cmake --build . -- -v
ninja: error: loading 'build.ninja': O sistema não pode encontrar o arquivo especificado.


Build complete (0 errors, 0 warnings): C:\Users\Mateus\Desktop\projetos_teste\project_5_0\build
Total time taken to build the project: 14.002 ms

Re: Using different ESP-IDF versions

Posted: Tue Dec 20, 2022 8:44 am
by ESP_kondalkolipaka
Hello,

I posted a quick write-up on the topic "switching ESP-IDF Versions in Espresiff-IDE" now. Could you please check and see if that helps?
https://medium.com/@kondal.kolipaka/swi ... 5d0ad9f7a0

Thanks

Re: Using different ESP-IDF versions

Posted: Tue Dec 20, 2022 12:23 pm
by MateusGL
Hi ESP_kondalkolipaka,

I think the option "ESP-IDF: Project Full Clean" is available only in the last Espressif-IDE. After upgrading from 2.4.0 to 2.7.0 I was able to follow your steps and everything worked as expected. Thank you!