Build and Flash with Eclipse IDE — ESP8266 RTOS SDK Programming Guide documentation (original) (raw)

Installing Eclipse IDE

The Eclipse IDE gives you a graphical integrated development environment for writing, compiling and debugging ESP8266_RTOS_SDK projects.

Windows Users

Using ESP8266_RTOS_SDK with Eclipse on Windows requires different configuration steps. See the Eclipse IDE on Windows guide.

Setting up Eclipse

Once your new Eclipse installation launches, follow these steps:

Import New Project

Project Properties

Navigate to “C/C++ General” -> “Preprocessor Include Paths” property page:

Navigate to “C/C++ General” -> “Indexer” property page:

Navigate to “C/C++ Build” -> “Behavior” property page:

Building in Eclipse

Before your project is first built, Eclipse may show a lot of errors and warnings about undefined values. This is because some source files are automatically generated as part of the ESP8266_RTOS_SDK build process. These errors and warnings will go away after you build the project.

If you try to build without running a configuration step first, ESP8266_RTOS_SDKf will prompt for configuration on the command line - but Eclipse is not able to deal with this, so the build will hang or fail.

TIP: If your project had already been built outside Eclipse, you may need to do a Project -> Clean before choosing Project -> Build. This is so Eclipse can see the compiler arguments for all source files. It uses these to determine the header include paths.

Flash from Eclipse

You can integrate the “make flash” target into your Eclipse project to flash using esptool.py from the Eclipse UI:

Note that you will need to use “make menuconfig” to set the serial port and other config options for flashing. “make menuconfig” still requires a command line terminal (see the instructions for your platform.)

Follow the same steps to add bootloader and partition_table targets, if necessary.