esp32/Makefile: Add support for EIM environments. - #19657
Open
agatti wants to merge 1 commit into
Open
Conversation
This commit lets the ESP32 port makefile work in environments set up via EIM (Espressif's SDK/toolchain manager) instead of the regular SDK export script. EIM-activated environment do not place `idf.py` into the system's PATH, so the Makefile needs to know where to look for it if it cannot be found right away. However, EIM does set up an environment variable that points to the environment root, and therefore picking up idf.py from there is trivial. As a bonus, if the makefile cannot find idf.py, it will report a more sensible error to the user rather than a generic "file not found" message. The documentation was also updated to mention EIM and the current state of things when using such a tool to manage your ESP-IDF SDKs. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
Code size report: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR lets the ESP32 port makefile work in environments set up via EIM (Espressif's SDK/toolchain manager) instead of the regular SDK export script.
EIM-activated environment do not place
idf.pyinto the system's PATH, so the Makefile needs to know where to look for it if it cannot be found right away. However, EIM does set up an environment variable that points to the environment root, and therefore picking up idf.py from there is trivial. As a bonus, if the makefile cannot find idf.py, it will report a more sensible error to the user rather than a generic "file not found" message.The documentation was also updated to mention EIM and the current state of things when using such a tool to manage your ESP-IDF SDKs.
This should close #19390.
Testing
An ESP32 build was initiated successfully with the environment set up by
export.fishfrom a previously set up SDK using the regular git checkout +install.shmethod, then from an environment activated via EIM, and finally with no environment set up to see the new error message.Trade-offs and Alternatives
Currently there may be an issue with EIM preventing building
mpy-crossfrom the same environment it sets up for cross-compilation builds (see espressif/idf-im-ui#1067). This is also mentioned in the documentation.Generative AI
I did not use generative AI tools when creating this PR.