I am using a local library for FRAM (https://github.com/SammyHerring/Adafruit_FRAM-I2C) and it worked without issue until today. I am not sure what changed but I get the dreaded “compiler timed out of encountered error” message for my Electron running 0.6.0 using Particle Dev on a Mac.
I tried compiling using the CLI to get more information. And the issue seems to be here:
Cellular-Logger-MMA8452Q.ino:53:63: fatal error: Adafruit_FRAM_I2C.h: No such file or directory #include “Adafruit_FRAM_I2C.h” // Library for FRAM functions
Again, this had worked for some time. Not sure what changed:
The library is in "lib/Adafruit_FRAM_I2C/src/Adafruit_FRAM_I2C.h
There is an #include “Adafruit_FRAM_I2C.h” in the main .ino file
I added a line dependencies.Adafruit_FRAM_I2C=1.0.0 to the project.properties
I even copied the Adafruit_FRAM_I2C.h and .cpp files into the same directory as the main .ino file without success.
If it helps, what I have been finding in my project which has a growing number of small libraries, some hosted, some local, some my own is that tiny errors that would normally be picked up and flagged by the compiler are now instead resulting in a timeout error. In my instance these have been the usual silly C-syntax typos like missing a semi-colon, and in any other modern IDE would probably be caught by the built-in linting tools. Getting linting working in Atom on Windows looks to be a bit of a pest but it might be easier for you on a Mac.
I’m not entirely sure what specifying a library in project.properties does, I think it might mean that the compiler is trying to find a library of that name that has been published to the cloud… Which might explain some of the file not found errors you are getting, in my case I just get a timeout.
I have been having this problem for over a week in Dev. I get this error for any compile error. I have had to resort to copy/pasting into Build to find the errors correct them and then copy back to Dev which will compile and flash fine if there are no errors. If you find a solution please report back, this problem is making Dev almost useless.
Hi Charles, sorry you’re having those issues. Looking at the output you provided I see that when using the CLI you’re passing the Cellular-Logger-MMA8452Q.ino which will just send this file. To compile whole project try particle compile electron ..
As for Particle Dev it might be a bug in current version. I can confirm same error you’re having and that it’s not present in latest version which we’ll release this week. I hope you can use the CLI until then.
FWIW…I’ve been experiencing the same issue more frequently with the exceedingly vague “compiler timed out or encountered an error”. I wasted hours this past weekend with a simple program that wouldn’t compile and I could only comment out blocks of code until I finally narrowed in on the issue which seemed to resolve itself. I should have copy-pasted my code onto the forum, but needed to get it working for a project.
I had thought this only occurred with Particle.variables() that had a string for the first parameter that was longer than 12 characters. However, that was not the case this weekend. It may have been due to a Timer callback that was doing a Particle.publish(). If that is a no no, then a more specific error message would certainly seem appropriate. I ended up removing the Timer object and resorting to simply using time stamps in loops.
Should I be attempting a CLI compile and post the output on the forum the next time it occurs?
Great suggestion to copy-paste into Build to identify the exact problem! However, that step should obviously not be needed.
@chipmc, by “Take the entry out of particle.properties” can you clarify what you mean by “Take the entry out”. What entry are you referring to? In my case, I did not have a set of local library files, nor did I have a lib directory.
Sure, I was following the process to create a library and had created a line in the particle.properties like this:
dependencies.Adafruit_FRAM_I2C=1.0.0
this is the entry that needed to be removed as - I suspect - it caused the compiler to go look for a library in the published catalog and fail.
I am not sure that deleting the lib directory was required but, that was the approach that Rick from tech support took and I followed his lead. I would imagine that, if you had a lot of private local libraries, having a directory structure would be good. It may also help for GitHub integration.
I’ve been experiencing the same issue in the desktop IDE…“compiler timed out or encountered an error”. After discovering it was a coding error, I forgot a semi-colon, and knowing I just recently installed 0.6.2, I changed the build target to version 0.5.3, re-compiled, and it worked as it should, giving me a compiler error for the missing “;”. So, I now compile in 0.5.3 and when my code compiles clean, I re-compile in 0.6.2 and flash to the device. Kinda crazy, but it works for now.