Portable and cross platform ESP IDF

evlquaker
Posts: 3
Joined: Fri Mar 08, 2019 2:25 pm

Portable and cross platform ESP IDF

Postby evlquaker » Wed Apr 08, 2020 11:48 pm

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.

chegewara
Posts: 2210
Joined: Wed Jun 14, 2017 9:00 pm

Re: Portable and cross platform ESP IDF

Postby chegewara » Thu Apr 09, 2020 3:16 am


evlquaker
Posts: 3
Joined: Fri Mar 08, 2019 2:25 pm

Re: Portable and cross platform ESP IDF

Postby evlquaker » Thu Apr 09, 2020 3:34 am

Yes, that is my listing.

ESP_Sprite
Posts: 8926
Joined: Thu Nov 26, 2015 4:08 am

Re: Portable and cross platform ESP IDF

Postby ESP_Sprite » Thu Apr 09, 2020 4:53 am

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

chegewara
Posts: 2210
Joined: Wed Jun 14, 2017 9:00 pm

Re: Portable and cross platform ESP IDF

Postby chegewara » Sat Apr 11, 2020 8:12 pm

Virtualbox with environment or docker.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: Portable and cross platform ESP IDF

Postby ESP_igrr » Sun Apr 12, 2020 10:07 am

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

Who is online

Users browsing this forum: Baidu [Spider], runeruiter and 99 guests