-
Notifications
You must be signed in to change notification settings - Fork 125
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
Compile only needed esp-idf components #83
Comments
The approach suggested in #72 might be a bit of an overkill, as it is addressing the problem of how do we compile and generate For "in-tree" components, that might be an overkill, especially given that we have like 70% of the solution already:
From then on, everything is solved already - |
Just to note that this task became even easier recently, as we no longer have a hard-coded list of esp idf components. I'm instead enumerating the components by doing directory scans instead. This should also make the task for plugging custom components easier. |
Yup, I noticed it, just haven't gotten around to implementing it. |
Regarding
is there any solution? |
This is fixed in master (see commit 468b792) but not in a release yet. |
Add `$ESP_IDF_COMPONENTS` and `esp_idf_components` configuration option that allow to specify a list of esp-idf components to build. This list can be used to trim down the esp-idf build and reduce compile time. Only implemented for the native build driver. Fixes #83
Add `$ESP_IDF_COMPONENTS` and `esp_idf_components` configuration option that allow to specify a list of esp-idf components to build. This list can be used to trim down the esp-idf build and reduce compile time. Only implemented for the native build driver. Fixes #83
Add `$ESP_IDF_COMPONENTS` and `esp_idf_components` configuration option that allow to specify a list of esp-idf components to build. This list can be used to trim down the esp-idf build and reduce compile time. Only implemented for the native build driver. Fixes esp-rs#83
Currently, when compiling the esp-idf all components are compiled by cmake, but only for select components the bindings are generated (everything that is included in
src/include/esp-idf/bindings.h
). That is currently around 1k C-files, which @igrr estimated could be brought down to around 600.This behavior is not that detrimental as recompiling the esp-idf is normally rare (e.g. on first build, after clean). (There is also currently a bug where changing the
sdkconfig
/sdkconfig.defaults
does not cause anesp-idf
recompilation.)However, when frequently changing the
sdkconfig
s or switing MCU, etc. and especially for CI such an improvement would be nice indeed.To fix this we need to pass a list of components to cmake so that it knows specifically which components to build. As a first approach, we can disable building all components for which no bindings are generated (I don't how many that is, though).
In the long term though, we should make this configurable (maybe with an approach like I suggested in #72) as the demand for more and more esp-idf components grows.
The text was updated successfully, but these errors were encountered: