Outgrew the Arduino IDE…How to setup Eclipse/Arduino/ESP8266

So I finally outgrew the Arduino IDE.  To be frank I outgrew it a few years ago and finally decided to try my favorite Eclipse with the Arduino plugin.  I also wanted to program the ESP8266 under Eclipse with Arduino also.  After many hours, installing and uninstalling four versions of Arduino, I eventually got it to work.  Based on this experience I thought I would consolidate the many steps into a single location.  Hope this helps others who want to use Eclipse with Arduino and the ESP8266

Install Steps:

1. Download Eclipse bundle (includes Arduino plugin) from baeyens site. Install to root of C drive.

2. Download Arduino IDE v1.5.6-r2 from here .  Install to root of C drive.

3. Download Python 2.7 from here and Install to root of C drive.  Make sure Python runs by opening a cmd window and enter:

python -h

If it cannot find Python you might have to add the dir path to the PATH variable.

4. Install esp8266 software can be done in 2 ways:

If you have git installed do the following:

open cmd window and enter

cd c:\Arduino\hardware
mkdir esp8266com
cd esp8266com
git clone https://github.com/esp8266/Arduino.git esp8266
cd esp8266/tools
python get.py

If you do not have Git you can download the zip file from here.

open cmd window and enter

cd c:\Arduino\hardware
mkdir esp8266com
cd esp8266com
mkdir esp8266

Unzip the downloaded file into “C:\Arduino\hardware\esp8266com\esp8266”

Go back to the cmd window and enter

cd esp8266/tools
python get.py

5. Start Eclipse by clicking launcher.exe under “C:\eclipseArduino” and configure it. Use the following steps:

  1. Go to Window –> preferences –> Arduino
  2. Change “Private hardware path” to “C:\Arduino\hardware\esp8266com\esp8266” as shown below:


6. Now create a new project under File->New project

Pick the boards.txt at “C:\Arduino\hardware\esp8266com\esp8266”

Now you can pick your ESP board and other ESP configuration settings. A screenshot of mine is shown below:


7. Compile and upload.  All done.  Let me know if I missed anything here.

Including the std library so you can use vector/map/list etc.

Took me a while to fight with the IDE (which I lost) but eventually had to update the platform.txt at location C:\Arduino\hardware\esp8266com\esp8266 to add the directive -lstdc++ at the end of the compiler.c.elf.libs line.  Line should look like:

compiler.c.elf.libs=-lm -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh -lstdc++

Without the library in place I would get the compiler error:

c:\arduino\hardware\esp8266com\esp8266\tools\xtensa-lx106-elf\xtensa-lx106-elf\include\c++\4.8.2\bits/stl_tree.h:1225: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'

Collision problems with the Arduino Time library

If you have downloaded the Time library for Arduino that allows you to do thing such as time_t = now() etc. then you might experience a collision with the ESP8266 core time library.  It gives errors such as:

esp8266/time.c:107:8: error: unknown type name 'time_t'

Seems the problem is the time.h and Time.h collide.  The only way around this, at least the simplest I found that works, is to rename the Arduino library Time.h header file and references within library .cpp files to something other than Time.h.  I renamed mine to TimeX.h.








4 thoughts on “Outgrew the Arduino IDE…How to setup Eclipse/Arduino/ESP8266

  1. I’m trying to find out whether to mess with Eclipse or not. I know this is a bit dated too so not sure how much has changed. I know the last company i worked for there was 3 of us doing Java development using Eclipse. They had worked with it a lot longer than I had. We spent more time troubleshooting Eclipse issues than actual code development. That’s really why I ask as I’m extremely reluctant to jump on that bandwagon again. So when you say you outgrew the Arduino IDE what exactly do you mean?

    1. Hi,
      I have been in software development for 30 years and after using eclipse (which I love) and other such as Visual Studio (which I hate) the Arduino IDE did seem very basic. Good for a newbie, but experienced developers soon tire of it. So that is what I meant by “outgrew”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s