-
Notifications
You must be signed in to change notification settings - Fork 135
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
Apply and persist required esp-idf changes for esp_config.h files #364
Comments
Sorry for replying with a delay. I'm are actually trying to escape the notion of "patches", and - since quite some ESP-IDF releases - we don't have to apply patches anymore. The last release which needs patches is V5.0.X (and the no longer officially supported 4.4.X), and that's only if you would like to use the Back in the days, the With PIO, we did not have any meaningful alternative, as the PIO build does not clone an ESP-IDF GIT repo, but rather, downloads the ESP-IDF as ZIP or so. These days what I would rather suggest is the most natural thing, which is - if you need your custom changes, then just fork the ESP-IDF repo, make your changes in your own fork, and then instruct And the above is a necessary setup for PR-ing/upstreaming the changes, so you would need it anyway if you plan to upstream those. |
I took another look around for a way to #define MBEDTLS_USE_PSA_CRYPTO but the only way I see is by modifying the tree itself at Because it's just a define, is there a way to pass a cflag arg to esp-idf-sys? I poked around cargo_driver.rs but didn't see anything useful. I'd rather not maintain a fork just to pass a flag. The TLS 1.2 compilation issues I can work around just by enabling it while upstreaming some fixes. Thank you for your time. |
By looking at one of the ESP-IDF native examples it seems to me that putting |
Setting that config doesn't |
Motivations
Some files in the ESP IDF require local modifications because they don't have sdkconfig options for them.
In my case, I need to enable
MBEDTLS_USE_PSA_CRYPTO
, which can only be enabled by patching:components/mbedtls/port/include/mbedtls/esp_config.h
:There's also some broken sdkconfig option combinations that need some local patching for now and eventually upstream fixes. In my case, some TLS1.2 macros still try to compile when the TLS1.2 config is disabled.
As of now, there's no official way to automate patching or persist these changes reliably. If these patches are committed, then the cargo build system will actually erase the changes with a fresh sync of the esp idf remote. The current workaround is to manually apply them and leave the
.embuild/espressif/esp-idf/v*
repo dirty.No
Desired behavior
A user can download an
esp-idf-sys
based repository that requires patches toesp-idf
and uponcargo build
, it automatically syncs theesp-idf
(as it does today, or by explicit syncs as some other open FRs suggest), then applies the required patches on top so that the build is successful.Alternatives
Additional context
The text was updated successfully, but these errors were encountered: