Skip to content

Quick Start Guide

Python 3.6 required

ESP-IDF requires Python 3.6 or newer. Please, upgrade your operating system in order to satisfy this requirement.

This is a detailed roadmap to walk you through the installation process.

Step 1. Install prerequisites

Some tools need to be installed on the computer before proceeding to the next steps.

To compile with ESP-IDF you need to get the following packages (in Ubuntu and Debian):

sudo apt-get install git wget flex bison gperf python3 python3-pip python3-setuptools ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0

CMake version 3.18.6 or newer is required. Install it with

This may take several minutes.

wget https://github.com/Kitware/CMake/releases/download/v3.18.6/cmake-3.18.6.tar.gz
tar -zxvf cmake-3.18.6.tar.gz
cd cmake-3.18.6
./bootstrap
make
sudo make install

Step 2. Get ESP-IDF

To build applications for the ESP32, you need the software libraries provided by Espressif in ESP-IDF repository.

To get ESP-IDF, navigate to your installation directory and clone the repository with git clone, following instructions below:

mkdir -p ~/esp
cd ~/esp
git clone -b release/v4.4 --recursive https://github.com/espressif/esp-idf.git

ESP-IDF will be downloaded into ~/esp/esp-idf.

Step 3. Set up the tools

Aside from the ESP-IDF, you also need to install the tools used by ESP-IDF, such as the compiler, debugger, Python packages, etc.

cd ~/esp/esp-idf
./install.sh

Step 4. Set up the environment variables

The installed tools are not yet added to the PATH environment variable. To make the tools usable from the command line, some environment variables must be set. ESP-IDF provides another script which does that.

source ~/esp/esp-idf/export.sh

Step 5. Start a project

Now you are ready to prepare your application for eCore.

Clone eCore repository. You can clone and build projects in your working directory. We are going to clone inside ~/esp directory:

cd ~/esp
git clone https://pickdata_fw@bitbucket.org/pickdata-fw/ecore.git

Once the ecore project is cloned, you can verify that there are 2 different folders inside: ecore_minimal_project and examples.

The first one contains a minimal project with basic configuration to start working with the eCore, while the second contains an example for each of the available modules.

You can find more examples related with the different modules here.

You can start with minimal or any example project. We start with ecore_minimal_project:

cd ecore/ecore_minimal_project

The ESP-IDF build system does not support spaces in the paths to either ESP-IDF or to projects.

Step 6. Build the project

Build the project by running:

idf.py build

This command will compile the application and all ESP-IDF components, then it will generate the bootloader, partition table, and application binaries.

If there are no errors, the build will finish by generating the firmware binary .bin files into the ./build directory.

Step 7. OTA firmware update

Flash the binary that you just built onto your eCore through Pickdata eCore SWUpdate.

  1. Connect the eCore and your PC to the same network.

    Connect them using Ethernet cable(s) to a local network with DHCP server (by default, eCore Ethernet is configured to get dynamic IP)

    Connect your PC to eCore WiFi with the following parameters (by default, eCore WiFi is configured as an access point) with

    SSID: eCore-xxxxxx
    
    where xxxxxx are the six last MAC address digits and
    Password: 12345678
    

    Multicast DNS service needed

    Windows users should set WiFi to private on the network profile.

  2. Type the URL in your web browser:

    http://ecore-xxxxxx.local/ota
    
    where xxxxxx are the six last MAC address digits. Pickdata eCore SWUpdate should load.

  3. Press the Browse button and select generated firmware binary .bin file from the ./build directory

  4. Finally, press the Update Firmware button. After a few seconds your eCore will be updated!

Info

Further information on ESP-IDF Programming Guide

Step 8. Debug logging

The eCore is configured by default to print logs to serial port (both RS232 & RS485 connectors can be used).

The baud rate of the serial UART port is 115200.

The eCore can also be configured to use remote logs using Telnet protocol. For more information, please check here.