Arduino-IDE revision 1.6.6

There’s a new version of the Arduino-IDE out which has a major new feature, arduino-builder.  What’s so good about it?  Well, for anyone else who, like me, hankers after good ole’ command-line builds, this is what you’ve been waiting for.  This version of the IDE actually folds in full support for arduino-builder, so once you’ve created your Makefile, you’re all set to ditch the clunky IDE window, fire up vi or emacs (or whatever) and compile …except…  Bugrit!  There’s always an “except” nowadays, isn’t there?!

Well, the show stopper in this case is that the newly minted 1.6.6 takes your old code and immediately fires back the error message:-

Board generic (platform esp8266, package esp8266) is unknown


Checking the preferences (either from the aforementioned clunky IDE window, or in your ~/.arduino15/preferences.txt file) shows that the board manager “additional URLs” are still there (these are the links back to the repository and should contain at least:-

Checking the selected board type under the “tools” pull down in the window (or in the “fqbn” line in the build.options.json file in the /tmp/buildxxxx directory, following a failed compile) also shows that the generic ES8266 module type is selected, so it should work.   But it doesn’t.

This seems to be one of the top reasons for the suggestion that you “stay with 1.6.5 for now” in the esp8266/Arduino GitHub installation instructions, but actually it turns out that this is simply an incompatibility between the old 1.6.5 and new 1.6.6 releases.

The fix** is quite simple; move your existing ~/.arduino15 directory to one side and create a new one, keeping only the original preferences.txt file.  First, close down the IDE window, if you happen to be running it (and it doesn’t matter whether you’re running the 1.6.5 version or the 1.6.6 version — close it!).

Move the original .arduino15 directory to one side, create a new ./arduino15 directory and then copy the preferences.txt file from the old directory into your newly created one.  Here’s a cut-and-paste’able version of that sequence (you might want to paste this into an xterm window and make sure that there are no line-breaks or odd HTML characters in there before pressing the <CR> key). Don’t try this on Windows!  :-

cd ${HOME} && mv ./.arduino15 ./.arduino15_ORIG-1.6.5 && mkdir ./.arduino15 && cp ./.arduino15_ORIG-1.6.5/preferences.txt ./.arduino15
[Just a quick aside on what that line means if you’re unfamiliar with Unix… The ${HOME} refers to your home directory and the “&&” characters simply tell the shell not to execute the next command (after the “&&”) unless the previous command was successful, so if any one of the commands in that long line fails, you’ll get an error message and execution will stop at that point… and you’ll have to sort it out yourself. 🙂 ]

Assuming that there weren’t any problems with the move, you should be able to fire up the 1.6.6 version of the Arduino-IDE and select the Board Manager from the Tools->Board submenu.  Select the “ESP8266 by ESP8266 Community” (which will be way down at the bottom of the scrollable list of options in the Board Manager window) and hit install.  That will trigger a download of the ESP8266 packages (including the latest updates to “stable”) and, when you start off a compile, it will all now work as expected.

Next, how do we get the arduino-builder to work.  More on that later.

Update #1 – 1.6.6 is a new version, so things are different.  One of the first things I noticed was that 1.6.6 tried to compile in all of the files in the project directory which I’d stored using filenames starting with a “.” character  — mostly chunks of older code or example code which I wanted to keep around for reference and which the previous versions up to 1.6.5 had considered to be “hidden”.  1.6.6 considers them fair game.

* = Double

** Thanks to Marvin Roger for pointing us all in the right direction with his posting to issue #973 on GitHub.



2 thoughts on “Arduino-IDE revision 1.6.6

Leave a Reply

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

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s