-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Docker image rebuilds all every time, doesn't do incremental build (IDFGH-2720) #4790
Comments
Unfortunately this is related to the fact that in Make build system, Kconfig tools are built in the ESP-IDF directory, not in the project build directory. Therefore the This problem (kconfig tools built in IDF directory) is solved in the CMake build system. If you are starting a new project, I would recommend starting with CMake. If that is not an option, you can start a named container (and without the --rm flag), and then execute the build in the running container using |
@igrr Thanks so much for the quick response! I'd love to use CMake instead, but it looks like ESP-ADF hasn't been updated for it (or at least some examples aren't). I have esp-idf and esp-adf natively on my main machine so I've tried that before messing with the Docker image further, but I get errors trying to do idf.py build on esp-adf/examples/get-started/pipeline_a2dp_sink_and_hfp with either esp-adf master or v2.0-beta2 This is the one my current project is most like. Running the named container, how would that look? I tried this but didn't get very far
I get to a bash terminal and can build and flash it once through
Similar path-style issues with idf.py
Did I do that wrong? |
Ah, I see, the entry point script doesn't get executed when doing |
I've tested the following and it seems to work:
Will add this recipe to the documentation. |
Yep, that seems to do the trick! With /dev/ttyUSB0 hooked up:
Subsequent runs just flash and monitor. I've also tested this with my custom combined IDF/ADF image and verified it works with I will try to update my project with cmake so I can just use Thanks! |
Environment
git describe --tags
to find it): v3.3.1 docker image - espressif/idf:v3.3.1xtensa-esp32-elf-gcc --version
to find it): 1.22.0-80-g6c4433aProblem Description
When building an application (e.g. hello world example) it does not do an incremental build on future runs.
Expected Behavior
Incremental build, future runs should not have to rebuild if the source did not change
Actual Behavior
Full project is built every time.
Steps to reproduce
docker run -it -v $PWD:/project -w /project --device=/dev/ttyUSB0 espressif/idf:v3.3.1 make defconfig
docker run -it -v $PWD:/project -w /project --device=/dev/ttyUSB0 espressif/idf:v3.3.1 make -j flash monitor
Make sure to do the boot button dance if you do not have the jumpers set for automatic boot/flashing
docker run -it -v $PWD:/project -w /project --device=/dev/ttyUSB0 espressif/idf:v3.3.1 make monitor
It tries to rebuild the whole project (all components) again.
Code to reproduce this issue
https://github.com/espressif/esp-idf/tree/v3.3.1/examples/get-started/hello_world
Debug Logs
The code runs fine, it is the build process that does not reuse the existing objects. A full rebuild is done every time, and that takes quite some time on some computers.
The text was updated successfully, but these errors were encountered: