Portable and cross platform ESP IDF
Portable and cross platform ESP IDF
I am building a program that needs to compile and upload to the ESP-32. I am trying to find a solution that is portable, with no installation required and no external dependencies. I also want this to be both Windows and Macintosh compatible. I have been trying for quite some time to find a solution. Does anyone know a way to do this? Help would be much appreciated.
Re: Portable and cross platform ESP IDF
Yes, that is my listing.
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: Portable and cross platform ESP IDF
*Compile* and upload, right? That effectively would involve packaging the entirety of esp-idf plus its dependencies... perhaps the fastest way would be to just ship a VM with a Linux install with that in it.
However, what exactly is the reason you need the compilation step? Even if it were just linking and flashing, the job would be a lot easier.
However, what exactly is the reason you need the compilation step? Even if it were just linking and flashing, the job would be a lot easier.
Re: Portable and cross platform ESP IDF
Virtualbox with environment or docker.
Re: Portable and cross platform ESP IDF
(I assume that Docker and virtual machines don't qualify due to "no external dependencies" and "no installation" requirements, so we need something that can be simply extracted onto the user's disk and will work with no extra steps; Without these requirements, Docker is indeed a good option, as long as you don't need to interact with the serial port.)
At the moment with IDF 4.0 and above there not too many dependencies left which can not be encapsulated in a "portable" (no installation on Windows, no symlinks on Linux/Mac) package:
- Python interpreter
- Git
Once these are available, everything else can be placed into a redistributable archive:
- a copy of IDF repository, along with any submodules
- "IDF Tools" directory (by default $HOME/.espressif or %USERPROFILE%\.espressif, but can be anywhere else, as long as IDF_TOOLS_PATH environment variable points to that location)
- under "IDF Tools" directory: distribution archives of all required compilers/tools, extracted version of these tools, and the Python virtual environment.
I think Git on Windows can also be supplied as a "portable" installation. Which leaves us with the problem of packaging a "portable" copy of Python (with setuptools, pip included). There are a few projects which aim to solve this problem. Also you will need to package the wheels required by IDF dependencies, and copy them into Pip cache so that the packages can be installed with no Internet access.
On macOS the problem of bundling a Python interpreter with an app seems to be a fairly common one, so you might find a solution there as well.
At the moment with IDF 4.0 and above there not too many dependencies left which can not be encapsulated in a "portable" (no installation on Windows, no symlinks on Linux/Mac) package:
- Python interpreter
- Git
Once these are available, everything else can be placed into a redistributable archive:
- a copy of IDF repository, along with any submodules
- "IDF Tools" directory (by default $HOME/.espressif or %USERPROFILE%\.espressif, but can be anywhere else, as long as IDF_TOOLS_PATH environment variable points to that location)
- under "IDF Tools" directory: distribution archives of all required compilers/tools, extracted version of these tools, and the Python virtual environment.
I think Git on Windows can also be supplied as a "portable" installation. Which leaves us with the problem of packaging a "portable" copy of Python (with setuptools, pip included). There are a few projects which aim to solve this problem. Also you will need to package the wheels required by IDF dependencies, and copy them into Pip cache so that the packages can be installed with no Internet access.
On macOS the problem of bundling a Python interpreter with an app seems to be a fairly common one, so you might find a solution there as well.
Who is online
Users browsing this forum: Bing [Bot] and 107 guests