Skip to content

esp32/Makefile: Add support for EIM environments. - #19657

Open
agatti wants to merge 1 commit into
micropython:masterfrom
agatti:esp32-eim
Open

esp32/Makefile: Add support for EIM environments.#19657
agatti wants to merge 1 commit into
micropython:masterfrom
agatti:esp32-eim

Conversation

@agatti

@agatti agatti commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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.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.

This should close #19390.

Testing

An ESP32 build was initiated successfully with the environment set up by export.fish from a previously set up SDK using the regular git checkout + install.sh method, 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-cross from 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.

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>
@github-actions

Copy link
Copy Markdown

Code size report:

Reference:  esp32: Make esp32.LDO objects static, release on soft reset. [f668077]
Comparison: esp32/Makefile: Add support for EIM environments. [merge of baad5a3]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make error with idf install from eim

1 participant