Hi all -
I've been asked to add an HTTP server to our application. My build directory in my application seems to be missing some files that are present in the IDF. I'm not sure what happened, but can someone remind me how to update the copy of the IDF components I have in my build directory?
Thanks...
EDIT: I tried deleting the "build" subdirectory from my project, and running make again. The subdirectory regenerated, but I still had files that were different from what I was expecting. What am I doing wrong?
how to update build copy of IDF files?
how to update build copy of IDF files?
- Attachments
-
- project.PNG (7.91 KiB) Viewed 3679 times
-
- idf.PNG (10.11 KiB) Viewed 3679 times
Re: how to update build copy of IDF files?
Hi mzimmers,
Not sure I fully understand your question, sorry. The "build" directory contains build output from the build system and compiler while building the project. Source files are generally not copied from the IDF_PATH directory to the build directory, instead the source files are compiled into object files and libraries in the build directory.
Does that shed some light? If not, can you please explain in detail exactly which files you expect to see in the build directory which aren't there?
Not sure I fully understand your question, sorry. The "build" directory contains build output from the build system and compiler while building the project. Source files are generally not copied from the IDF_PATH directory to the build directory, instead the source files are compiled into object files and libraries in the build directory.
Does that shed some light? If not, can you please explain in detail exactly which files you expect to see in the build directory which aren't there?
Re: how to update build copy of IDF files?
Hi Angus -
I'd forgotten that the build directory doesn't contain source files. The file I want to use is esp_http_server.h from esp_http_server/include. I notice that it's not in $IDF_PATH/components/esp32/include. It's been so long since I added a component to my programs that I don't remember how to do it. Do I just copy the header file to this directory?
Thanks...
EDIT: I did a bit more snooping, to try to knock the rust off my memory. I guess somehow, make magically finds all the include files in the IDF. So, I removed the pathname portion of my #include directive and it found the file. I'm still not sure I know how it does this, but it builds.
On a side note, I use Qt Creator as my code editor and browser, and a code model enforcer. It couldn't find the enums for HTTP_GET, HTTP_POST, etc. so I went looking for them, and I couldn't find them anywhere either, but...the build succeeds. Where are these defined?
I'd forgotten that the build directory doesn't contain source files. The file I want to use is esp_http_server.h from esp_http_server/include. I notice that it's not in $IDF_PATH/components/esp32/include. It's been so long since I added a component to my programs that I don't remember how to do it. Do I just copy the header file to this directory?
Thanks...
EDIT: I did a bit more snooping, to try to knock the rust off my memory. I guess somehow, make magically finds all the include files in the IDF. So, I removed the pathname portion of my #include directive and it found the file. I'm still not sure I know how it does this, but it builds.
On a side note, I use Qt Creator as my code editor and browser, and a code model enforcer. It couldn't find the enums for HTTP_GET, HTTP_POST, etc. so I went looking for them, and I couldn't find them anywhere either, but...the build succeeds. Where are these defined?
Re: how to update build copy of IDF files?
The ESP-IDF build system automatically adds all of the include paths for used components when it runs the compiler.mzimmers wrote: ↑Tue Aug 13, 2019 1:56 pmEDIT: I did a bit more snooping, to try to knock the rust off my memory. I guess somehow, make magically finds all the include files in the IDF. So, I removed the pathname portion of my #include directive and it found the file. I'm still not sure I know how it does this, but it builds.
If you're using CMake, note that components in CMake need to declare which other components they depend on - otherwise the paths for these components won't be passed to the compiler.
Defined here:mzimmers wrote: ↑Tue Aug 13, 2019 1:56 pmOn a side note, I use Qt Creator as my code editor and browser, and a code model enforcer. It couldn't find the enums for HTTP_GET, HTTP_POST, etc. so I went looking for them, and I couldn't find them anywhere either, but...the build succeeds. Where are these defined?
https://github.com/espressif/esp-idf/bl ... rser.h#L98
As you can see, the header uses some C preprocessor magic to generate the full HTTP_POST symbol name. If Qt Creator is not running the header files through the preprocessor, it won't be able to recognize the symbol name.
Who is online
Users browsing this forum: Bing [Bot], ESP_Roland, ok-home and 109 guests