avatarJ3

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

7330

Abstract

m.com/v2/resize:fit:800/1*egu7dgelQcHEp_7ai5Se8w.png"><figcaption>Fig 14. The next time, just execute <b>ESP-IDF Command Prompt (cmd.exe</b>) and <b>YOU ARE GOOD TO GO!</b></figcaption></figure><h2 id="a392">Why I had to start from the beginning</h2><p id="d25c">Because the <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started-legacy/windows-setup.html">Legacy GNU Make Build System</a> did not work in my Windows 10:/, maybe because of the <a href="https://www.anaconda.com/">Anaconda </a>installation (?)</p><div id="03ce"><pre><span class="hljs-attribute">Operational</span> System name: Microsoft Windows <span class="hljs-number">10</span> Home Single Language <span class="hljs-attribute">Vertion</span>: <span class="hljs-number">10</span>.<span class="hljs-number">0</span>.<span class="hljs-number">18363</span> Compilation <span class="hljs-number">18363</span> <span class="hljs-attribute">Laptop</span>: Dell Inc. <span class="hljs-attribute">Model</span>: Inspiron <span class="hljs-number">5447</span> <span class="hljs-attribute">System</span> PC based <span class="hljs-literal">on</span> X64</pre></div><p id="82a8">To recreate the problem I’ve taken these steps (previous <a href="https://readmedium.com/esp-idf-programming-guide-wifi-lora-32-v2-53f89e12c96e">post</a>):</p><ul><li>Freshly unzipped msys32 into (C:);</li><li>create <i>esp </i>directory in the <i>home/user</i> directory;</li><li>clone idf repo into ‘esp’ directory with <i>git clone — recursive <a href="https://github.com/espressif/esp-idf.git">https://github.com/espressif/esp-idf.git</a>;</i></li><li>create script to export path variable <i>export IDF_PATH=C:/msys32/home/owen.lyke/esp/esp-idf;</i></li><li>close msys32 and reopen, verify path variable existence with printenv IDF_PATH;</li><li>check python version and <i>which python2.7</i> (it is /mingw32/bin/python2.7);</li><li>upgraded pip with <i>python -m pip install — upgrade pip;</i></li><li>upgrade setuptools with <i>pip install — upgrade setuptools;</i></li><li>used <i>pacman -S mingw-w64-i686-python2-cryptography</i> per above;</li><li>tried to install requirements with <i>python2.7 -m pip install — user -r IDF_PATH/requirements.txt;</i></li><li><a href="https://github.com/espressif/esp-idf/issues/2480#issuecomment-425790054">#2480 (comment)</a></li></ul><p id="d4cb">If you want to try for yourself, here are my <a href="https://readmedium.com/esp-idf-programming-guide-wifi-lora-32-v2-53f89e12c96e">annotations</a> about my try:</p><p id="e1b4">I recommend you to use the new method exposed here:). It is the easiest way ever!</p><p id="19e9">And from what I have been reading at <a href="https://docs.espressif.com/projects/esp-idf/en/v4.1-beta2/get-started/index.html">Expressif</a>, perhaps in the near future, it will be the facto <i>ESP-IDF</i> Windows 10 deployer:) — Access Jun 2020.</p><p id="8261">Fine, now we can go code <i>a new ESP-IDF project</i>:)</p><p id="0ff0">But that will be a task for another post…</p><p id="e379">That’s all for now!</p><p id="35ef">Thank you!</p><p id="b507"><b>Please see</b> the <b>Troubleshooting</b> section <b>below</b>…</p><h2 id="3f85">Credits &amp; References:</h2><div id="1a0f" class="link-block"> <a href="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/windows-setup-scratch.html"> <div> <div> <h2>Setup Windows Toolchain from Scratch - ESP32 - - ESP-IDF Programming Guide latest documentation</h2> <div><h3>This command will clone the master branch, which has the latest development ("bleeding edge") version of ESP-IDF. It is…</h3></div> <div><p>docs.espressif.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/)"></div> </div> </div> </a> </div><p id="5c67"><a href="https://docs.espressif.com/projects/esp-idf/en/v3.3/api-guides/build-system-cmake.html">https://docs.espressif.com/projects/esp-idf/en/v3.3/api-guides/build-system-cmake.html</a></p><div id="03f9" class="link-block"> <a href="https://cmake.org/cmake/help/latest/guide/tutorial/index.html#cmake-tutorial"> <div> <div> <h2>CMake Tutorial - CMake 3.17.3 Documentation</h2> <div><h3>The CMake tutorial provides a step-by-step guide that covers common build system issues that CMake helps address…</h3></div> <div><p>cmake.org</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/)"></div> </div> </div> </a> </div><div id="b22d" class="link-block"> <a href="https://www.espressif.com/"> <div> <div> <h2>Espressif Systems - Wi-Fi and Bluetooth chipsets and solutions</h2> <div><h3>ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. is a fabless semiconductor company, with headquarter in Shanghai Zhangjiang…</h3></div> <div><p>www.espressif.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*oRkZ_PeJvxnWrxB-)"></div> </div> </div> </a> </div><div id="22fa" class="link-block"> <a href="https://heltec-automation-docs.readthedocs.io/en/latest/esp32+arduino/quick_start.html"> <div> <div> <h2>Heltec ESP32+Arduino Series Quick Start - Heltec Automation Docs V0.0.1 documentation</h2> <div><h3>Edit description</h3></div> <div><p>heltec-automation-docs.readthedocs.io</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/)"></div> </div> </div> </a> </div><div id="15c0" class="link-block"> <a href="https://my-esp-idf.readthedocs.io/en/latest/get-started/index.html"> <div> <div> <h2>Get Started - ESP-IDF Programming Guide v3.0-dev-1395-gb9c6175 documentation</h2> <div><h3>This document is intended to help users set up the software environment for developement of applications using hardware…</h3></div> <div><p>my-esp-idf.readthedocs.io</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*-Ajp4uJSNxCNGAJ6)"></div> </div> </div> </a> </div><div id="6c9f" class="link-block"> <a href="https://heltec.org/project/wifi-kit-32/"> <div> <div> <h2>WiFi Kit 32</h2> <div><h3>Sale! 16.00 $9.99 Include a SH1.25 x 2 battery cable; Not include Li-Po battery and Micro USB cable. 1550 in stock…</h3></div> <div><p>heltec.org</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*j02mwZCPMqlvHpuI)"></div>

Options

       </div>
        </div>
      </a>
    </div><div id="979f" class="link-block">
      <a href="https://github.com/HelTecAutomation/Heltec_ESP32">
        <div>
          <div>
            <h2>HelTecAutomation/Heltec_ESP32</h2>
            <div><h3>English | 简体中文 This library must work with Heltec ESP32 develop framework! A detail document about how to install…</h3></div>
            <div><p>github.com</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*piw9_H0xX9xXe-q1)"></div>
          </div>
        </div>
      </a>
    </div><div id="31b2" class="link-block">
      <a href="https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series">
        <div>
          <div>
            <h2>Heltec-Aaron-Lee/WiFi_Kit_series</h2>
            <div><h3>English | 简体中文 This environment is fully cloned from espressif ESP32 and ESP8266 projects, on that basis, we fixed…</h3></div>
            <div><p>github.com</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*Z-9nFGE6Jv3zFQ4G)"></div>
          </div>
        </div>
      </a>
    </div><div id="5d70" class="link-block">
      <a href="https://heltec.org/project/wifi-lora-32/">
        <div>
          <div>
            <h2>WIFI LoRa 32 (V2)</h2>
            <div><h3>WiFi LoRa 32 is a classic IoT dev-board designed &amp; produced by Heltec Automation(TM), it's a highly integrated product…</h3></div>
            <div><p>heltec.org</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*QTTn_f-ZxsLbXoiI)"></div>
          </div>
        </div>
      </a>
    </div><div id="9928" class="link-block">
      <a href="https://pt.aliexpress.com/item/32824839148.html?src=google&amp;src=google&amp;albch=shopping&amp;acnt=494-037-6276&amp;isdl=y&amp;slnk=&amp;plac=&amp;mtctp=&amp;albbt=Google_7_shopping&amp;aff_platform=google&amp;aff_short_key=UneMJZVf&amp;&amp;albagn=888888&amp;albcp=7303158455&amp;albag=86143156931&amp;trgt=743612850714&amp;crea=pt32824839148&amp;netw=u&amp;device=c&amp;gclid=CjwKCAiA0svwBRBhEiwAHqKjFoG2YOLlBO5lcEYuX8_aBW9q8aY-2fAKifQYp5oDg36UPUuFOK6_1RoCEEQQAvD_BwE&amp;gclsrc=aw.ds">
        <div>
          <div>
            <h2>R$42.9 |LILYGO®4 m byte (32 m bit) pro esp32 oled v2.0 ttgo &amp; esp32 oled wifi módulos + bluetooth…</h2>
            <div><h3>LILYGO®4 m byte (32 m bit) pro esp32 oled v2.0 ttgo &amp; esp32 oled wifi módulos + bluetooth duplo ESP 32 esp8266 et…</h3></div>
            <div><p>pt.aliexpress.com</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*SVaSE5840yJ5_eb-)"></div>
          </div>
        </div>
      </a>
    </div><div id="4488" class="link-block">
      <a href="https://www.semtech.com/lora/resources/lora-videos">
        <div>
          <div>
            <h2>Videos | Resources | Semtech LoRa Technology | Semtech</h2>
            <div><h3>Discover LoRa use cases, meet the ecosystem, view conference presentations, and more. Find more technical videos in the…</h3></div>
            <div><p>www.semtech.com</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*lo5NmlTYlsZWhf3i)"></div>
          </div>
        </div>
      </a>
    </div><div id="8b62" class="link-block">
      <a href="https://lora-developers.semtech.com/get-started/what-can-i-do-with-lora">
        <div>
          <div>
            <h2>What Can I Do With LoRa?</h2>
            <div><h3>To date, LoRa and LoRaWAN®-based solutions have deployed in a wide variety of use cases around the world. In Africa…</h3></div>
            <div><p>lora-developers.semtech.com</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*ZBg05f3RjsLCFFkF)"></div>
          </div>
        </div>
      </a>
    </div><div id="07fb" class="link-block">
      <a href="https://discourse.cmake.org/t/welcome-to-the-cmake-discourse-site/8">
        <div>
          <div>
            <h2>Welcome to the CMake Discourse Site</h2>
            <div><h3>This forum hosts discussion of topics related to CMake. Please follow our Code of Conduct when posting to this forum…</h3></div>
            <div><p>discourse.cmake.org</p></div>
          </div>
          <div>
            <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*2hHvS0mTwDp1eQgz)"></div>
          </div>
        </div>
      </a>
    </div><h1 id="886a">Related Post</h1><p id="a1a2">00#Episode — <a href="https://readmedium.com/esp-idf-programming-guide-wifi-lora-32-v2-53f89e12c96e">ESP_IDF_Series — ESP-IDF Programming Guide + WiFi LoRa 32 (v2) — How To Get Started</a></p><p id="466a">01#Episode — ESP_IDF_Series — <a href="https://readmedium.com/lora-lpwan-long-range-low-power-wide-area-network-65cfa264d7c6">LoRa LPWAN — Long Range Low Power Wide Area Network</a> — LoRa was developed by Semtech, founder LoRa Alliance —</p><p id="dd64">02#Episode — ESP_IDF_Series — ESP-IDF Programming Guide + WiFi LoRa 32 (v2) + idf.py utility — How To Really Get Started (this one)</p><p id="9ef3">03#Episode — ESP_IDF_Series — <a href="https://readmedium.com/esp32-idf-helloworld-get-started-b891a52a681d">ESP32-IDF — HelloWorld Get Started — How To Get Started</a></p><p id="013e">05#Episode FreeRTOS — <a href="https://readmedium.com/freertos-a-real-real-time-tv-transmissions-7d09e2b2d1bb">A Real Real-Time TV Transmissions — Fundamental Understanding about FreeRTOS Apps </a>— IoT</p><h1 id="cc0c">Troubleshooting — Driver Bridge — WiFi LoRa 32 V2</h1><p id="1927">If the driver is installed previously, a COM port will be allotted as soon as you plug your ESP32 kit (mine is <a href="https://heltec.org/project/wifi-lora-32/">WiFi LoRa 32 V2</a>). Otherwise, download the silicon labs cp2102 driver from <a href="http://www.silabs.com/documents/public/software/CP210x_Windows_Drivers.zip">here</a> &amp; install it with this utility Program <a href="http://www.wch.cn/download/CH341SER_EXE.html">CH341SER.EXE</a> on your PC. <a href="https://youtu.be/bX14whtcXAw">Everything will be allright</a> o/</p><figure id="0777"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*1qOSPcu0gqYi8Xgs.png"><figcaption>Fig 15 . This is the driver: <a href="https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers">Silicon Labs CP210x USB to UART Bridge</a> \o/</figcaption></figure><p id="fb48">If it didn’t help, please access this page: <a href="https://my-esp-idf.readthedocs.io/en/latest/get-started/establish-serial-connection.html#establish-serial-connection-with-esp32">Establish Serial Connection with ESP32</a>.</p></article></body>

ESP-IDF Programming Guide + WiFi LoRa 32 (v2) + idf.py utility

How To Really Get Started — ESP_IDF_Series Episode #02

Hi, this is CMake-based ESP-IDF build system.

Read this document if you want to know how to organize and build a new ESP-IDF project or component using the CMake-based build system. Welcome o/

Yeap! I chose to start from the beginning using this installer walk-through:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/windows-setup.html#esp-idf-tools-installer

That works beautifully for me:)

Note 
Currently only 64-bit versions of Windows are supported. 32-bit Windows can use the Legacy GNU Make Build System.
What is idf.py ?
idf.py is a top-level config/build command line tool for ESP-IDF

Use this link https://docs.espressif.com/projects/esp-idf/en/latest/get-started/windows-setup-scratch.html walk-through official explanation.

It worked like a breeze for me:D

ESP-IDF Tools Installer

The easiest way to install ESP-IDF’s prerequisites is to download the ESP-IDF Tools installer.

The installer includes the cross-compilers, OpenOCD, cmake and Ninja build tool. The installer can also download and run installers for Python 3.7 and Git For Windows if they are not already installed on the computer.

The installer also offers to download one of the ESP-IDF release versions. See my options below…

Here are my definitions that may work for you too:

Fig 1. Python 3.8 (64-bit)
Fig 2. Git 2.21.0
Fig 3. Download ESP-IDF — It will /desktop
Fig 4. I chose ESP-IDF 4.0.1 version
Fig 5. C:\Users\giljr\.expressif
Fig 6. ESP-IDF official layout 4 Win10:)
Fig 7. A project layout simplified for your reference
Fig 8. The installer opens the prompter window, and all you have to do is to connect your ESP-32 Board, see the Port it is attached, go to C:\Users\giljr\Desktop\esp-idf\examples\get-started\blink directory and run idf.py build and finally idf.py -p COM10 flash or whatever port the device are connected to you platform :)

Here is the code:

Fig 9. The blink.c is configured to output to GPIO-5; I put a 3mm LED GPIO 5 together with 1k resistor at GND (see gif below:)
Fig 10. Please run idf.py menuconfig > Example Configuration > (25) Blink GPIO number
Fig 11. Choosing GPIO25 to use built-in LED on WiFi LoRa 32 (v2), a classic IoT dev-board designed & produced by Heltec Automation(TM):)
Fig 12. Everything works fine! I ran this code: idf.py -p COM3 flash (please, go to your Device manager and see what port your ESP32 is connected!)
Gif 1. The flashing GPIO 05 is a 1-second delay each \o/ I put a 3mm LED GPIO 5 together with 1k resistor at GND. Hint: you can set GPIO 25 using idf.py menuconfig command to flash instead (this is build-in LED for this board)😜
Gif 2. The GPIO 25 built-in LED flashes @ 1s interval \o/
Fig 13. Here is the directory created for me: C:\Users\giljr\Desktop\esp-idf
Fig 14. The next time, just execute ESP-IDF Command Prompt (cmd.exe) and YOU ARE GOOD TO GO!

Why I had to start from the beginning

Because the Legacy GNU Make Build System did not work in my Windows 10:/, maybe because of the Anaconda installation (?)

Operational System name: Microsoft Windows 10 Home Single Language
Vertion: 10.0.18363 Compilation 18363
Laptop: Dell Inc.
Model: Inspiron 5447
System PC based on X64

To recreate the problem I’ve taken these steps (previous post):

  • Freshly unzipped msys32 into (C:);
  • create esp directory in the home/user directory;
  • clone idf repo into ‘esp’ directory with git clone — recursive https://github.com/espressif/esp-idf.git;
  • create script to export path variable export IDF_PATH=C:/msys32/home/owen.lyke/esp/esp-idf;
  • close msys32 and reopen, verify path variable existence with printenv IDF_PATH;
  • check python version and which python2.7 (it is /mingw32/bin/python2.7);
  • upgraded pip with python -m pip install — upgrade pip;
  • upgrade setuptools with pip install — upgrade setuptools;
  • used pacman -S mingw-w64-i686-python2-cryptography per above;
  • tried to install requirements with python2.7 -m pip install — user -r $IDF_PATH/requirements.txt;
  • #2480 (comment)

If you want to try for yourself, here are my annotations about my try:

I recommend you to use the new method exposed here:). It is the easiest way ever!

And from what I have been reading at Expressif, perhaps in the near future, it will be the facto ESP-IDF Windows 10 deployer:) — Access Jun 2020.

Fine, now we can go code a new ESP-IDF project:)

But that will be a task for another post…

That’s all for now!

Thank you!

Please see the Troubleshooting section below

Credits & References:

https://docs.espressif.com/projects/esp-idf/en/v3.3/api-guides/build-system-cmake.html

Related Post

00#Episode — ESP_IDF_Series — ESP-IDF Programming Guide + WiFi LoRa 32 (v2) — How To Get Started

01#Episode — ESP_IDF_Series — LoRa LPWAN — Long Range Low Power Wide Area Network — LoRa was developed by Semtech, founder LoRa Alliance —

02#Episode — ESP_IDF_Series — ESP-IDF Programming Guide + WiFi LoRa 32 (v2) + idf.py utility — How To Really Get Started (this one)

03#Episode — ESP_IDF_Series — ESP32-IDF — HelloWorld Get Started — How To Get Started

05#Episode FreeRTOS — A Real Real-Time TV Transmissions — Fundamental Understanding about FreeRTOS Apps — IoT

Troubleshooting — Driver Bridge — WiFi LoRa 32 V2

If the driver is installed previously, a COM port will be allotted as soon as you plug your ESP32 kit (mine is WiFi LoRa 32 V2). Otherwise, download the silicon labs cp2102 driver from here & install it with this utility Program CH341SER.EXE on your PC. Everything will be allright o/

Fig 15 . This is the driver: Silicon Labs CP210x USB to UART Bridge \o/

If it didn’t help, please access this page: Establish Serial Connection with ESP32.

Idf Py
Heltec Esp32 Wifi V2
Esp32 Programming
Lora
Esp Idf Easy Installer
Recommended from ReadMedium