-
Notifications
You must be signed in to change notification settings - Fork 7.6k
CMake ERROR when compiling. missing dependencies, cmake doesn't find the correct files #7810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Juanc179 |
Hi @SuGlider , i tried via CMD and Powershell, also from Python and it doesn't recognize "idf.py" i also tried with "esp-idf.py" and didn't get any results. but, If i search via windows it finds it.... I installed the latest version of IDF (5.0) a few days ago via ESP-IDF extension on vs code. The setup pops up asking for the version and the directory for the install, i choose the latest and didn't touch anything regarding directories. I took a long time installing all the files, time ago i did the same for another project with an older version and it worked just well. |
Arduino is not yet compatible with ESP-IDF v5.x, you need to install v4.4.x to use with Arduino :) |
In order to be able to run
As @me-no-dev pointed out, Arduino Core 2.0.6 is based on IDF 4.4.3. There is an Espressif Web Site where you can pick the right version of IDF and its Windows Installer: |
Hi @SuGlider , thank you all for your time and your responses. I tried the things below.
[1027/1051] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/main.cpp.obj before compiling vs code detected "Arduino.h", after build; Arduino.h: No such file or directory. All the CMake files, SDK config, dependencies.lock,CMakeLists.txt are by default. |
Looks like it's not finding the Arduino component, or not adding it to the include. What are the contents of both |
content of Project-Template/main/CMakeLists.txt;
I don't know if it is related, but only after build it doesn't detect Arduino.h header, if i try to go to the definition it goes just as usual and shows me the content of the file. |
It seems that there is no `components\arduino" folder in your project... This is an example of Folder Project Structure for an Arduino RainMaker exmaple: Here, there are other 2 examples in the same repository: |
In order to verify if the project is correctly strucutured, please refer to the documentation: |
This post and the whole issue may also help you: |
Hi, the components are in another folder stored in my computer. in the ESP32 programming guide it suggest to have a single componets folder for multiple projects to avoid having to copy and paste the same folder every single time you create a project. I added that path before building and it detected de arduino.h header file. I did this when i created the project, before building. |
@SuGlider i read more in detail the #7839 and he's doing another thing, im just trying to compile the code (without any outside library). he's adding libraries outside the usual components. I saw his error message was the same, but im not (yet) trying to add any library. |
Hi, @SuGlider i changed my project conguration like you said and the problem persist. For instance i reinstalled my computer so i have a clean install of ESP-IDF v4.4.4. I added at the start of the project (using New Project command of the extension) the path of my componets folder. The project created succesfully with VS code showing the folder as the image shows below. |
Looks like your arduino is in |
Platformio/VSC provides the possibility to compile Arduino as a Component without the need to setup anything yourself. See the example projects how to do. |
Yes, i know that IDE. I tried it last year but i'am more keen towards IDF. at the time PlatformIO had tons of problems and IDF worked well at the first time. Now i tried to update to the latest version and ruined it all :(... |
Yes, it was dangerous/tricky to use native IDF and VSC IDF. Latest release (espressif32 @ 6.0.1) does install in an pyenv not anymore global. So this havoc should not happen anymore. |
Okay, i'll try platformIO again then. thank you very much all of you @me-no-dev @Jason2866 @SuGlider . I've been more time solving problems than coding |
Board
ESP32 DEV MODULE
Device Description
Only the devkit for testing compilation, build and flash.
Hardware Configuration
plain devkit
Version
latest master (checkout manually)
IDE Name
ESP-IDF (Arduino as a component)
Operating System
win 11 21h2
Flash frequency
Default
PSRAM enabled
yes
Upload speed
115200
Description
I am creating a project using Vs code with ESP-IDF with Arduino as a component. When building the project the compilation ends and gives an error code related to the route to this bootloader: "bootloader_flash_config_esp32.c" i looked after it manually and i got to it. The problem is when CMake tries to find it and "edit" or changes the route to it.
The route given in the compilation error is ok but the dependency is not. I don't know where to change this, or if it is a problem of Cmake.
The project never built before and i haven't changed anything since it was created. i only added the browse and include path to the c_cpp_properties.json for the components. the rest is "stock".
Sketch
Debug Message
Other Steps to Reproduce
(Ass the problem is on CMake i add a few screen shots, maybe im missing something on those files).
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: