ESP-IDF VSCode Extension - CMake error
Posted: Fri May 21, 2021 8:35 pm
Hi everyone!
I am new with ESP-IDF. I am starting with VSCode and ESP-IDF Extension. I have watched severals tutorial but I still have problems to run the hello-world example.
First, I had the problem that the standard library <stdio.h> was not found. I found and read a lot of issues in this forum and github issues but the problem was solved alone after attempt a lot of time, installing, uninstalling, and changing the ESP-IDF Extension Version. What I could see was that when the problem occurred, the in file was empty, like. And when the problem was solved, "compilerPath" took the value of the path to the xtensa-esp32-elf-gcc.exe file.
I do not know why at the beggining, this did not happen.
After that this problem was solved, I tried to build the project but got the follow error:
As you can see, ESP-IDF and ESP-IDF Tools are installed in "C:/", and the project created from example is saved in "D:/", that is a partition of the hard disk.
What is exactly what I have to do/modify???
I am using:
ESP-IDF V4.2
ESP-IDF VSCode Extension V1.0.3
Windows 10 Pro
Thanks in advance.
I am new with ESP-IDF. I am starting with VSCode and ESP-IDF Extension. I have watched severals tutorial but I still have problems to run the hello-world example.
First, I had the problem that the standard library <stdio.h> was not found. I found and read a lot of issues in this forum and github issues but the problem was solved alone after attempt a lot of time, installing, uninstalling, and changing the ESP-IDF Extension Version. What I could see was that when the problem occurred, the
Code: Select all
"compilerPath"
Code: Select all
c_cpp_properties.json
Code: Select all
"compilerPath":""
Code: Select all
"compilerPath": "C:\\ESP\\tools\\.espressif\\tools\\xtensa-esp32-elf\\esp-2020r3-8.4.0\\xtensa-esp32-elf\\bin\\xtensa-esp32-elf-gcc.exe"
After that this problem was solved, I tried to build the project but got the follow error:
Code: Select all
> Executing task: cmake -G Ninja .. <
CMake Error: The current CMakeCache.txt directory D:/OneDrive/8 Desarrollo Software/5 ESP-IDF/hello_world/build/CMakeCache.txt is different than the directory c:/ESP/esp-idf/examples/get-started/hello_world/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "D:/OneDrive/8 Desarrollo Software/5 ESP-IDF/hello_world/CMakeLists.txt" does not match the source "C:/ESP/esp-idf/examples/get-started/hello_world/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command cmake -G Ninja .." terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it
What is exactly what I have to do/modify???
I am using:
ESP-IDF V4.2
ESP-IDF VSCode Extension V1.0.3
Windows 10 Pro
Thanks in advance.