Click on the icon, on the right-hand side above.
This short tutorial describes a way to make a virtual machine (VM) configured for ESP32 software development with Espressif IDE, based on Eclipse. It also explains how to start using it. The virtualization environment is VirtualBox, and the guest machine runs Linux Mint.
Versions are:
- Linux Mint Xfce 21.3
- Espressif-IDE 2.12.1 (based on Eclipse IDE 2023-12)
- ESP-IDF: 5.2.1
- Hardware: a 64-bit computer with enough memory so that the VM can be granted 4 GB, with a few tens of GB available on the disk, and one free USB A or USB C port
- Hardware (bis): an Espressif ESP32-C6-DevKitM-1 with a USB C cable to connect it to the computer
- Software development competencies:
- Basic knowledge of Linux (knowing the most common commands...)
- Basic knowledge of VirtualBox (knowing how to create a virtual machine...)
Check this guide to create a Linux Mint Xfce 21.3 VM.
In what follows, it is assumed that the user's account username is developer
.
First, install the prerequisites: Java, Python, Git. Start the Synaptic package manager (main menu then Settings > Synaptic Package Manager). Then install the packages listed in the sections below.
Install openjdk-21-jdk.
Install python3-venv and python3-pip packages.
Install git package.
Ccache can improve build time.
Download the Linux version of the Espressif-IDE.
At the time of writing, the file name is Espressif-IDE-2.12.1-linux.gtk.x86_64.tar.gz
.
Create the ~/DevTools
subdirectory, where Espressif-IDE will be installed. It can be any other directory name, or existing directory, but in what follows it is assumed that this is the installation directory.
In the file manager, double-click the file and extract the content to the ~/DevTools
directory.
Add a launcher to the main menu:
- Right click on the main menu icon and select Edit Applications
- Select the
Development
directory - Click the + tool and select Add Launcher
- For Command, select
/home/developer/DevTools/Espressif-IDE/espressif-ide
- Click the launcher icon and select
/home/developer/DevTools/Espressif-IDE/icon.xpm
- Click the
New Launcher
string and replace it byEspressif-IDE
- Click the
A small descriptive blurb about this application.
string and replace it byEspressif-IDE
- Click the Save Launcher tool
- Close the window
Start Espressif-IDE with the launcher you just created.
Modify the proposed workspace path, replacing it with /home/developer/Dev/workspace
. The default directory can be kept, or any other existing or non-existing directory can be chosen, but in what follows it is assumed that this directory contains all ESP32 projects.
In Espressif-IDE window menu, select Espressif > Download and Configure ESP-IDF.
Keep the proposed v5.2.1 version. Set the download directory to /home/developer/DevTools
.
Click the Finish button.
After the ESP-IDF download completion, accept to install the tools. Beware: the Install Tools window wich is then displayed may be displayed behind the Espressif-IDE window. Ensure to bring it back to foreground. Keep the default values for ESP-IDF directory, for git location and python location, and click the Install Tools button.
When the Progress tab says No operations to display at this time.
, the configuration is done.
click on the Restore icon on the left-hand side of the window:
The Console view displays the following messages:
Copying OpenOCD Rules
Copying File: /home/developer/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin/../share/openocd/contrib/60-openocd.rules to destination: /etc/udev/rules.d/60-openocd.rules
Unable to copy rules for OpenOCD to system directory, try running the eclipse with sudo command
In a terminal, run the command as requested:
$ sudo cp /home/developer/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin/../share/openocd/contrib/60-openocd.rules /etc/udev/rules.d/60-openocd.rules
Connect the board to a USB port of the computer. Use the board USB port marked USB.
Check that the virtual machine can see it, with Devices > USB. A new USB device should be visible: Espressif USB JTAG/serial debug unit. Tick the associated checkbox.
You can assign the board to the virtual machine on a permanent basis with Devices > USB > USB Settings....
Create a new project, choosing the hello_world template. The template selection is now on the same page as the project name input. Select esp32c6 for project target:
Build the project, as explained here.
Flash the project, as explained here. Check the target configuration by clicking the gear wheel on the right-hand side of the launch target drop-down: Serial Port should be set to /dev/ttyACM0 USB JTAG/serial debug unit:
To display trace messages printed by the application, start a terminal. Serial port should be set to /dev/ttyACM0.