Setting up ESP-IDF for ESP32 offline

A few things still uphold from older posts like PlatformIO CLI and IDE Bundle for offline installation - #6 by ivankravets and PlatformIO for VSCode offline installation - #2 by ivankravets, mainly:

  • VSCode will attempt do download dependencies (C/C++ extension, Python extension, …) when installing the PlatformIO VSCode extension, that needs internet
  • PlatformIO will install packets, platforms or libraries from the internet if they’re missing locally.

This question also partly overlaps with the already asked question on how to make PlatformIO building offline and reproducable with e.g. a docker container: How to download libraries. Please read those fully.

A way that I would try would be:

  • download a portable version of VSCode. Install the Microsoft C/C++, Python and PlatformIO extension. Through some magic way, create an archive that contains this entire VSCode installation with installed plugins so that it can be moved from one computer to another and used without internet access. VSCode people maybe know more about this.
  • download all necessary libraries, platforms and packages that PlatformIO will need in the offline install, through PlatformIO
    • see post above
    • easiest way would be to simply compile and upload the target project(s) once, as that will trigger the installation of the platform and packages (toolchain, framework, upload tools, …) in PlatformIO, which will be saved in the <home path>/.platformio/ folder. Then that folder has to be copied accross computers as well.