-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pkg: use esptool.py v4.9.0 as package #21557
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
Conversation
`esptool.py` is now used as a package within a virtual Python environment. Since `esptool.py` is used for compilation on the one hand and for flashing on the other, `esptool.py` is installed in two separate virtual Python environments, one for compilation and one for flashing only. This is required 1. to be able to flash a precompiled application only without compiling the package and 2. to be able to compile an application in RIOT Docker and flash it on the host system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, works like a charm! (tried with esp8266-esp-12x
)
Hm, for the ESP8266, the old and simple version 2.4.0 in |
@benpicco Thanks for reviewing, testing and merging. |
Contribution description
This PR adds
esptool.py
v4.9.0 as a package and installs it in virtual Python environments.For newer ESP32x variants like ESP32-H2 and ESP32-C6 a newer version of
esptool.py
is required, for example version v4.9.0 However, this version became a more complex Python project with a number of dependencies instead of a single Python file. Therefore, I decided to useesptool.py
as a package from now on and install it in a virtual Python environment.Since
esptool.py
is required for compilation as well as for flashing,esptool.py
is installed in two separate virtual Python environments, one for compilation and one for flashing only. This is needed to be ableIt is still possible to use your own installation of
esptool.py
by overriding the variableESPTOOL
in the make command.Since the virtual Python environments are created in
$(RIOTBASE)/build
, it could be that the compilation in CI takes too long and it would be better to install it once directly in$(RIOTBASE)/dist/tools/esptools
, which would also require an update of RIOT Docker. On my local system the installation ofesptool.py
in a fresh build directory costs about 15 seconds.Testing procedure
should install
esptool.py
in$(RIOTBASE)/build/pkg/esptool/venv
and should use it for the preparation of the.bin
file.should install
esptool.py
in$(RIOTBASE)/build/pkg/esptool/venv_flash
and should work.should install
esptool.py
in/data/riotbuild/riotbase/build/pkg/esptool/venv
in RIOT docker and in$(RIOTBASE)/build/pkg/esptool/venv_flash
on host and should work.Issues/PRs references
Prerequisite for PR #21522