TheMakerForum

Espressif ESP32 chip => Installing Development Framework for ESP32 => Topic started by: BlackByte on March 23, 2018, 09:39:16 PM

Title: Installing the Espressif IoT Development Framework (ESP-IDF)
Post by: BlackByte on March 23, 2018, 09:39:16 PM
  On this post we would learn the things that will help us to program our ESP32 chip. That information comes from the official web page so we would try to clarify some issues about.

This are general things you need to know and we would like to answer with time.

Important concepts.

The matter that concerns us.

Source of this post https://esp-idf.readthedocs.io/en/latest/get-started/index.html (https://esp-idf.readthedocs.io/en/latest/get-started/index.html)
Title: Installing the ESP-IDF "what is the ESP32".
Post by: BlackByte on March 26, 2018, 08:42:18 PM
Answering basic questions
What is the ESP32 chip microcontroller

- The ESP32 is the name of a series of chip microcontroller from the Espressif System manufacturer. In the image below you can see the ESP32-D0WDQ6 chip microcontroller.

(https://i.imgur.com/tHi77vE.jpg)
Title: Installing the ESP-IDF "What is the ESP32 Module"
Post by: BlackByte on March 26, 2018, 09:06:29 PM
Answering the basic questions.
What is the ESP32 Module?

- The ESP32 Module is a pcb that contain the ESP32 chip combining this microcontroller with external components to work with. This external components could be anything that the ESP32 chip could need like crystal oscillator, memory, filter capacitors, RF antennas and so on. In the image below you can see the ESP-WROOM32 module who is a surface-mount printed circuit board from Esspresif Systems.

(https://i.imgur.com/0aBHu5r.jpg)

- Espressif Systems it is not the only who made modules with the ESP32 chip. There are many other Vendors that make modules. This is very important when we want to program our esp32 chip, because every module could make use of the input and output in different ways or use different crystal frequencis, so many people can find problems using the espressif system installing tutorial and application examples.
Title: Installing the ESP-IDF "What is the ESP32 development kit"
Post by: BlackByte on March 26, 2018, 09:31:18 PM
Answering questions
What is the ESP32 development kit

- The ESP32 development kit is a printed circuit board that extend wiring and also may add functionality to the ESP32 chip or module to make it easier to use for delevopment.

- In the image below you can see the ESP32 DevkitC development board from Espressif Systems.

(https://i.imgur.com/mvoMQXJ.jpg)

As in the module example, there are many development boards for the ESP32. Make shure you are using apropiate software for your development board.
Title: Installing the ESP-IDF "What is the ESP-IDF"
Post by: BlackByte on March 27, 2018, 05:03:14 PM
Answering the questions.
What is the ESP-IDF

- The ESP-IDF (Espressif IoT Development Framework) is a file that provides the necessary APIs for the ESP32 and scripts to operate the Toolchain. An API is an Application Programming Interface that provides a subset of subrutines, functions and procedures working as a library to build specific applications.
Title: Installing the ESP-IDF "What we would need"
Post by: BlackByte on March 29, 2018, 09:43:16 PM
The matter that concern us!
What we would need to program our ESP32 chip?

- First of all you have to know that this instructions only works when you have an ESP32 development board like "ESP32 DevkitC from Esspresif Systems"
 (for other vendors, please refer to their own instruction unless you have a compatible board).

- That being said this are the hardware and software elements we would need for Windows PC:


The Zip file contain prebuild Toolchain with code examples, Mingw32.exe and the APIs for compiling and flashing apps into the ESP32 chip.
Title: Installing ESP-IDF "Start installation"
Post by: BlackByte on April 03, 2018, 03:38:04 PM
Installing
Installation of the ESP-IDF

- Before downloading the ESP-IDF we need to install one Toolchain and one GNU-compatible environment to make applications on windows. The GNU-compatible environment is the MSYS2 and we will download both of them in a single prebuild ZIP form this link https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20180110.zip (https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20180110.zip).

- After this download we would unzip this Msys32 file in the C: drive.

- Then we will open Msys32 file directory and create a new file directory named esp, this would be the file in wich the ESP-IDF will be downloaded.

- Next step is to run Mingw32.exe inside the Msys32 file directory and follow this steps to download the ESP-IDF.


Code: [Select]
cd c: enter
Code: [Select]
cd msys32 enter
Code: [Select]
cd esp32 enter

(https://i.imgur.com/34KLxyt.jpg)

Code: [Select]
git clone --recursive https://github.com/espressif/esp-idf.git
- Thus we have the ESP_IDF and we are almost ready to run the ESP32 Development kit.


Continue to Setup Path to ESP-IDF...
Title: Installing the ESP-IDF "Setup the Path to ESP-IDF"
Post by: BlackByte on April 05, 2018, 08:54:26 PM
Continuing the setup of your Path to ESP-IDF
Setup the Path to ESP-IDF for Msys2

- The toolchain programs access the ESP-IDF throught the IDF-PATH environement variable. We will build this IDF-PATH on the /profile.d folter:

- In my computer is like this C:/msys32/etc/profile.d. Once in that directory, create a file named "export_idf_path.sh" and write inside this file your IDF_PATH. In my case is
Code: [Select]
export IDF_PATH="c:/msys32/esp/esp-idf" save the file and close.

- Run the msys32.exe and run this command to check if IDF_PATH is set.

Code: [Select]
printenv IDF_PATH
- You should see this if success.
(https://i.imgur.com/ADU30y4.jpg)
Title: Installing the ESP-IDF "Finish"
Post by: BlackByte on April 09, 2018, 06:42:31 PM
At this point we have the software tools to run our ESP32 development board on Windows.

I recommend you to continue in the link below to the next steps on "Required tools to run the ESP32 development board".

URL Required tools to run the ESP32 development board on windows. (http://thebytespace.cl/smf/index.php?topic=80.0)
Title: Re: Installing the Espressif IoT Development Framework (ESP-IDF)
Post by: gionica669 on May 23, 2019, 05:57:16 AM
interesting topic.