Compiling and burning with eclipse under Windows

Source: Internet
Author: User
Tags idf

The Eclipse IDE is an open-source, front-end programming software that provides a graphical integrated development environment for writing, compiling, and debugging ESP-IDF projects.

First, in https://www.obeo.fr/en/eclipse-download?INSTALLER-WIN64, select the desired number of corresponding bits of eclipse.

Then download the Java environment required for Eclipse to run in http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.

In the installation is the choice

Click Install JDK environment and Eclipse software. Opening eclipse results is as follows

STEP1;set up Eclipse

Once the new Eclipse installation starts, follow these steps:

Import New Project
  • Eclipse uses makefile support in ESP-IDF. This means that you need to create a ESP-IDF project first. You can use the Idf-template project in GitHub or open an example in the ESP-IDF examples subdirectory. (Choose the HelloWorld of the previous article here)
  • Once eclipse is running, select File-> Import ...

  • In the dialog box that pops up, select C + + +-> Existing code as Makefile Project, and then click Next.
  • on the next page, enter "Existing code location" as the directory for your IDF project. do not specify the path to the ESP-IDF directory itself (later). The directory you specify should contain a file named "Makefile" (Project Makefile).
  • On the same page, under Toolchain for indexer settings, uncheck Show only available toolchain to support this platform.
  • in the list of extensions that appear, select Cygwin GCC. and then click Finish.

    When you open the tap, you see that the new item is displayed under Project Explorer.

    STEP2; Project Properties

    Right-click the project and choose Properties from the context menu

  • Click the "C + + + Build" Property page (Top level):

    • Uncheck "Use default Build command" and enter it in your custom build command
      Python ${idf_path}/tools/windows/eclipse_make.py
  • Click the "Environment" property page under "C + + + Build":

    • click "Add ...", enter a name batch_build and value 1
    •  

    • click" Add ... "again, enter the name idf_path . The value should be the full path to the installation Esp-path. The Idf_path directory should be specified with a non-backslash (that is, the c:/users/myuser/development/esp-idf) oblique Slash.
    • to edit the PATH environment variable. Delete the existing value and replace it with (3 bin path)
      c:\users\li\desktop\esp32\msys32\usr\bin; C:\Users\li\Desktop\ESP32\msys32\mingw32\bin; C:\Users\li\Desktop\ESP32\msys32\opt\xtensa-esp32-elf\bin 

       

     

  • Click Preprocessor Include Paths, Macros, etc. "to replace the ${COMMAND} text at the beginning of the line by doing the following xtensa-esp32-elf-gcc .

  • Click to tick "CDT GCC Build Output Parser"and change the full compiler command mode toxtensa-esp32-elf-(g?cc)|([gc]\+\+)|(clang)

  • Choose Appply and Close, at this time see the project has no error.
  • Outside of Eclipse, open a command-line prompt. Navigate to the project directory and run the ESP-IDF settings to configure the project. This step must now be run outside of Eclipse.make menuconfig,和上篇文章的编译操作一样。
  • After clicking Build to compile,

  • Choose to create a flash-burning file
  • Select Project->build target->build to compile the flash and write the program to the Development Board.

  • The process is completed, and then the whole burn-write result is verified according to the verification method of the previous article.
  • Technical details

    • The
    • xtensa-esp32-elf-gcc Cross compiler is not a  cygwin toolchain, although we tell Eclipse that it is a. This is because MSYS2 uses Cygwin and supports Cygwin path (type /c/ Blah instead of c:/blah or c:\\blah ). Specifically, XTENSA-ESP32-ELF-GCC reports to Eclipse's "built-in Compiler settings" feature, with its built-in include directories in /usr/ where this is the Unix/cygwin style path that eclipse otherwise cannot resolve. by telling the Eclipse compiler that it is Cygwin, which uses the cygpath The utility resolves these paths within .
    • the same problem occurs when parsing output from ESP-IDF. eclipse resolves this output to find the header directory, but cannot resolve the form's include directory without /c/blah using it cygpath . Eclipse Build Output parser uses a heuristic to determine if it should be called cygpath , but the ESP-IDF configuration does not trigger it for the reason that is currently unknown. Therefore, the eclipse_make.py wrapper script is used to invoke make cygpath The output that is then used to process eclipse.

Compiling and burning with eclipse under Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.