Skip to content

makefile/tools/esptool: cleanup including version update to 5.0.0#21619

Merged
crasbe merged 7 commits intoRIOT-OS:masterfrom
gschorcht:pkg/esptool_5.0.0
Jul 23, 2025
Merged

makefile/tools/esptool: cleanup including version update to 5.0.0#21619
crasbe merged 7 commits intoRIOT-OS:masterfrom
gschorcht:pkg/esptool_5.0.0

Conversation

@gschorcht
Copy link
Copy Markdown
Contributor

Contribution description

This PR is a cleanup for esptool.py. It includes the following changes:

  • The esptool.py is no longer installed as a RIOT package, but as a pure Python package, as published by Espressif. The installation takes place in a virtual Python environment in the dist/tools/esptools/venv directory.
  • Since there is no need to pull the GitHub repository and thus not necessary to install it as a RIOT package, the pkg/esptool RIOT package has been removed.
  • The installation of the esptool.py is now version-sensitive.
  • Only the esptool.py from the Python package is used now.
  • Older versions of esptool.py are therefore removed from dist/tools/esptool.
  • The option to use a custom esptool.py has been removed because the command options of the current version of esptool.py are not compatible with older versions of esptool.py. The use of a custom esptool.py therefore no longer makes sense.
  • esptool.py is udated to the current version 5.0.0.

Testing procedure

Compilation in CI should succeed.

Issues/PRs references

The `esptool.py` program is no longer installed as a RIOT package, but as a pure Python package, as published by Espressif. The installation takes place in a virtual Python environment in the `dist/tools/esptools/venv` directory. Therfore, there is no need to pull the GitHub repository and thus not necessary to install it as a RIOT package.
The cleanup includes the following changes:
- The `esptool.py` is no longer installed as a RIOT package, but as a pure Python package, as published by Espressif. The installation takes place in a virtual Python environment in the `dist/tools/esptools/venv` directory.
- The installation of the `esptool.py` is now version-sensitive.
- The `esptool.py` from the Python package is always used.
- The option for users to use a custom `esptool.py` has been removed because newer versions of `esptool.py` use renamed options that are not compatible with older versions of `esptool.py`. Using a custom `esptool.py` therefore makes no sense.
Since only the `esptool.py` from the Python package, as published by Espressif, is used, older `esptool.py` versions are removed.
@github-actions github-actions bot added Area: doc Area: Documentation Area: build system Area: Build system Area: pkg Area: External package ports Area: tools Area: Supplementary tools Platform: ESP Platform: This PR/issue effects ESP-based platforms Area: cpu Area: CPU/MCU ports labels Jul 23, 2025
@gschorcht gschorcht added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 23, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Jul 23, 2025

Murdock results

✔️ PASSED

a36704e makefile/tools/esptool: update to version 5.0.0

Success Failures Total Runtime
10515 0 10515 11m:14s

Artifacts

@gschorcht gschorcht force-pushed the pkg/esptool_5.0.0 branch from fa9a06a to eb55347 Compare July 23, 2025 09:43
Copy link
Copy Markdown
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash :)

@gschorcht gschorcht force-pushed the pkg/esptool_5.0.0 branch from b0f0736 to a36704e Compare July 23, 2025 12:06
@gschorcht
Copy link
Copy Markdown
Contributor Author

Thanks for reviewing and approving 😄

@crasbe crasbe added this pull request to the merge queue Jul 23, 2025
Merged via the queue into RIOT-OS:master with commit 6db3719 Jul 23, 2025
25 checks passed
@gschorcht gschorcht deleted the pkg/esptool_5.0.0 branch July 30, 2025 13:21
@benpicco benpicco added this to the Release 2025.10 milestone Dec 3, 2025
@maribu
Copy link
Copy Markdown
Member

maribu commented Mar 28, 2026

This sadly had the side effect that BUILD_IN_DOCKER=1 now is basically broken, as venv installations are not moveable.

Specifically, the esptool will have a shebang of #!/data/riotbuild/riotbase/dist/tools/esptools/venv/bin/python3 when installed using BUILD_IN_DOCKER, but that path is unlikely to exist in the host system, where the second call to esptool to flash is performed.

@gschorcht
Copy link
Copy Markdown
Contributor Author

This sadly had the side effect that BUILD_IN_DOCKER=1 now is basically broken, as venv installations are not moveable.

Hmm, that's too bad. I think the only option is to use a different virtual environment in riotdocker. But how can I tell if I'm currently in a riotdocker environment or not?

@maribu
Copy link
Copy Markdown
Member

maribu commented Mar 31, 2026

I think the only option is to use a different virtual environment in riotdocker.

I think this is fine.

But how can I tell if I'm currently in a riotdocker environment or not?

ifeq (1,$(INSIDE_DOCKER))
  $(info "Hello from inside docker!")
endif

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

Labels

Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: pkg Area: External package ports Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants