eCore Quick Start Guide¶
Installation Step by Step¶
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
Note
- CMake version 3.18.6 or newer is required.
To install CMake version 3.18.6, you have to type the following commands:
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
Important
- CMake installation may take several minutes.
Python compatibility¶
ESP-IDF supports Python 3.6 or newer. It is recommended to upgrade your operating system to a recent version satisfying this requirement.
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.3 --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
You can start with minimal or any example project. We start with ecore_minimal_project:
cd ecore/ecore_minimal_project
Important
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. You can do this in two ways:
Ethernet¶
Steps:
Connect eCore to local network with DHCP server (by default, eCore Ethernet is configured to get dynamic IP)
Put the following URL in your web browser:
http://ecore-xxxxxx.local/ota
, where xxxxxx are the six last MAC address digitsPickdata eCore SWUpdate must be shown.
- Press the Browse button and select generated firmware binary .bin file from the
./build
directory- And finally, press the Update Firmware button. After a few seconds your eCore will be updated!
WiFi¶
Steps:
- Connect your PC to eCore WiFi with following parameters (by default, eCore WiFi is configured as an access point):
SSID: eCore-xxxxxx, where xxxxxx are the six last MAC address digits
Key: 12345678
- Put following URL in your web browser:
http://ecore-xxxxxx.local/ota
Pickdata eCore SWUpdate must be shown.
- Press the Browse button and select generated firmware binary .bin file from the
./build
directory- And finally, press the Update Firmware button. After a few seconds your eCore will be updated!
Important
It's assumed that Multicast DNS service is enabled. To enable Multicast DNS on Windows, WiFi must be set to private on the network profile.
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).
Info
The baud rate to use for the serial UART port is 115200.
Another way to debug is by using the telnet protocol. To use it, you must configure telnet in the app_main of your application using the following command:
remote_log_init()
To start telnet remote log you can use the following command: telnet eCore-xxxxxx
, where xxxxxx are the six last MAC address digits.