You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PlatformIO extension can be installed in VSCode. The extension also needs an installation of Python 3.6 or above.
The virtualenv module (venv pypi package) must be available as well.
Forcing PlatformIO to use a different Python installation other than the system installed is tricky.
PlatformIO does not work with a conda Python environment. The workaround is to use a portable Python build from python-build-standalone project.
Using pip from portable Python, install the platformio package as
pip install platformio
Now open VSCode and Install the PlatformIO extension.
Once installed open VSCode user settings, search for PlatformIO and use the following options:
Use a built-in PlatformIO Core: Untick
Use a portable Python3 interpreter if available: Untick
PlatformIO Home does not open when using the PlatformIO extension from a remote VSCode setup (like code tunnel or VSCode server).
This is because the extension tries to connect to the PlatformIO core web server started on localhost on opening the PIO home page. When VSCode is accessed remotely the localhost from the web browser's context is not the same as the localhost of the system where PlatformIO core is installed.
In such cases use the PlatformIO Core CLI to create a new project from the command line and open the folder in VSCode instead.
Example
mkdir my-esp32-project
cd my-esp32-project
pio project init --board esp32doit-devkit-v1
Use the -v / --verbose argument for the detailed commands being run
Cleaning build files
pio run --target clean
or pio run -t clean -v
Uploading build files without compiling
This is useful when we do not want to distribute the source code of the firmware.
We can delete the source directories (include/, lib/, source/, test/) and keep the other directories including the .pio directory.
Then in the project folder
Boot process
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/startup.html
Partitions
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html