Skip to content

uPesy only delivers currently in France.

Contents Menu Expand Light mode Dark mode Auto light/dark mode

Use VS Code & Platformio to create complex projects on ESP32

This article explains how to install the Visual Studio Code software with the PlatformIO plugin to be able to program in the same software more than 400 development boards such as Arduino, ESP32, Nucleo, STM32, Teensy, Raspberry Pi boards.

Boards and libraries are automatically installed from the software.

Visual Studio Code is available on all platforms (Windows / MacOS / Linux).

Installing VS Code

To install Visual Studio Code on Windows , follow these steps:

  • Download the latest software version from the official website, by clicking “Download for Windows (Stable Build)”

  • Launch the .exe installation file, then after accepting the terms of the license agreement, you can choose the installation folder:

../../_images/vs1.png
  • In the window on additional tasks, check at least the following boxes:

../../_images/vs2.png
  • The installation is now complete, the VS Code welcome page is as follows:

../../_images/vs3.png
  • VS Code defaults to English. To put it in French, you have to download a “French Language Pack” extension available in the plugin manager (last icon in the left menu).

../../_images/vs4.png

Note

Even if VS Code can be put in French, PlatformIO remains in English .

  • Then VS Code must restart to change the language

../../_images/vs5.png
../../_images/vs6.png

Visual Studio Code is now in French.

Note

To change the language, you must click on Cogwheel> Command palette , type language in the command palette, then click on Change display language .

../../_images/vs8.png ../../_images/vs7.png

VS Code can be completely personalized, among other things you can change the theme.

Now that the text editor has been installed, PlatformIO must be installed to be able to program the boards.

PlatformIO

Installation on VS Code

  • The installation of the PlatformIO plugin is done directly in VS Code, from the plugin manager. Just type in the search bar PlatformIO , then click on Install .

../../_images/vs9.png
  • If the installation was successful, a window prompting you to reload VS Code appears:

../../_images/vs10.png
  • A new icon has been added to the left menu. We arrive on the PlatformIO home page:

../../_images/vs11.png

The installation of PlatformIO is complete.

Configure PlatformIO for ESP32

So far, no platform (Arduino / ESP-IDF / STM32Cube) has been installed. All the necessary tools will be downloaded and installed when creating a project for a specific board.

To be able to program an ESP32 as on the Arduino IDE software (using the Arduino-ESP32 framework):

  • Create a new project by clicking on Projects> Create New Project

../../_images/vs12.png
  • Then give your project a name, select an ESP32 board, for example the Espressif ESP32 Dev module board. You can then choose between the Arduino or ESP-IDF framework. Select Arduino to program the ESP32 in the same way as on the Arduino IDE.

../../_images/vs13.png
  • Click on src> main.cpp in the drop-down menu on the left to start programming like on the Arduino IDE.

../../_images/vs13.png
  • To be able to use the PSRAM of the uPesy Wrover Devkit board, you have to add in the configuration file platformio.ini

build_flags =
 -DBOARD_HAS_PSRAM
 -mfix-esp32-psram-cache-issue
../../_images/vs15.png

We use cookies to make your visit to the site as pleasant as possible. Privacy Policy