Giter Site home page Giter Site logo

lm-esp32-eclipse's Introduction

Table of contents

Click on the icon, on the right-hand side above.

Overview

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

Prerequisites

  • 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...)

Creation of the VM

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.

VM configuration

Reference documents

Prerequisites

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.

Java

Install openjdk-21-jdk.

Python

Install python3-venv and python3-pip packages.

Git

Install git package.

Optional: Ccache

Ccache can improve build time.

Espressif-IDE

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 by Espressif-IDE
  • Click the A small descriptive blurb about this application. string and replace it by Espressif-IDE
  • Click the Save Launcher tool
  • Close the window

Espressif-IDE configuration

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

ESP32-C6-DevKitM-1 connection

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

Sample application

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.

lm-esp32-eclipse's People

Contributors

pascalbod avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.