Has anyone tried the new version of Arduino IDE 1.6.8?

Has anyone tried the new version of Arduino IDE 1.6.8? Does it solve the slow upload issues I have had since 1.6.5? Any gotchas?

I tried it briefly this morning. It seems to have fixed the compiler errors I was seeing in 1.6.6 and 1.6.7 with any sketch using the FastLED library. I didn’t need to use forward declarations or rearrange the code to get it to compile.

Still slower than 1.6.5 due to the new dependency analysis. But with the builder fixed, it’s the first version of Arduino that actually handles C/C++ syntax well and automatically discovers which other libs are needed (eg, SPI if you use Ethernet).

I ended up having to submit two separate fixes to help get the forward declaration BS working. If I never see/touch ctags again it’ll be too soon.

I mean, the obvious solution is to just acknowledge that you’re writing C++ code anyway, and write the damn forward declarations.

#dealwithit

Yeah, ctags is something I hope to never have to touch. At least I (and others) managed to talk them out of using a program called “coan” to parse for the includes. Running “gcc -E” might not be the fastest way, but at least it’s absolutely guaranteed to give correct results that perfectly match what gcc does when the code really is compiled!

I still have trouble understanding why compiling and downloading using an Arduino makefile is many times faster than using the IDE. Something unnecessary is going on in there. I can’t use a 1.6GHz Atom to download code unless I use a makefile; then it’s faster than my i7 running the IDE.

I think it’s because the IDE is doing a poor job of figuring out what does/doesn’t need to be recompiled :- where make is VERY good at that

Arduino is doing things a normal makefile doesn’t and can’t do. With make, you have to add code in your makefile for any other libraries you use. Imagine if FastLED was a Linux shared lib. You’d run a ./configure script, which would slowly run dozens, perhaps hundreds of “checking xyz” shell scripts, and ultimately write the makefile. The first part of this Arduino build process is something sort of equivalent to running a configure script. Before 1.6.6 it was done with quick but terrible regex pattern matching. Arduino had tons of long standing bugs, dating back to at least 2008. Now gcc -E and ctags do this, with proper parsing of conditionally compiled code, and hopefully now ctags won’t suck so much. Anyway, if you’re going to compare Arduino to make, the fair technical comparison would be to an autoconig script and then running make. Except Arduino 1.6.8 isn’t yet smart enough to skip the configure script (or cache results) if nothing’s changed. Hopefully future versions will improve the speed.

@Daniel_Garcia You’re assuming that it actually tries to figure out what needs to be rebuilt – it doesn’t. Arduino copies all the source for a sketch (including libraries) to a temporary directory and compiles it in-place. Because of this, none of the previously-compiled .o or .d files left by GCC are available to speed up subsequent compilations.

@Daniel_Tullemans - The previous .o and .d files are kept in the temporary folder and reused on the next compile. I know this, because I contributed this code to Arduino years ago.

@PaulStoffregen Is there an expiration time on that? Because it seems that if you recompile 30 seconds later then it’s fast, but a minute or two later and it’s slow again. If there is an expiration time, such a short period would surely be rather pointless in a typical dev cycle where you might have to think about stuff and write some code in between compiles…

@Jason_Coon I tried your new ESP8266 webserver code with Arduino 1.6.8 and it was giving compiler errors due to forward declaration. I tried rearranging the code and ran into a chicken-and-egg scenario. I’m stuck! Any suggestions (other than using Arduino IDE 1.6.5)?

Yeah, I spoke too soon, looks like the compiler issue persists with certain sketches. Back to 1.6.5, sigh.

@Garrett_Mace - I tested 1.6.8 just now. It’s reusing the compiled .o files at least 15 minutes later. I’m using Ubunutu 14.04. Maybe something Windows or Mac specific is happening with the temp files?

@Jason_Coon if the compiler issue is persisting with 1.6.8 please open an issue up on the Arduino github (if they’re not tracking it, I promise you it isn’t going to get fixed - and we tend to abuse the world more than most Arduino users :slight_smile:

@Daniel_Garcia I think I have it narrowed down to a simple example. In DemoReel100, just moving the declaration of SimplePatternList and gPatterns above setup seems to cause compilation errors: https://github.com/jasoncoon/test-1-6-8/blob/master/test-1-6-8.ino

@Garrett_Durland , moving the equivalent declarations below setup fixes the compiler errors. I’ll test and commit the changes soon.

I’ll search and create an issue on GitHub if I don’t find it. Thanks!