An "impossible" compiler error message

I using the cloud compiler and a (brand new) Photon. I occasionally/frequently get the following error message:

error:  'class USBSerial' has no member named 'printf'

and
error: ‘class SystemClass’ has no member named ‘ticksPerMicrosecond’

but then I’ll re-compile my code (without having changed anything) and it’ll compile just fine (and flash and run fine).

One thing I’ve noticed (and I hesitate to even mention it because it sounds crazy and should be completely irrelevant based on my model of how software works) is that this happens more frequently when the program running in the Photon is doing output to the serial port at the time of the compilation/flashing. (Compiling and flashing are done over the air …) I had a serial.println() by mistake being invoked everything time through ‘loop()’, and it took a dozen tries or more to flash a fixed version. As I reduced the serial.print calls the above error messages happened less frequently.

Post hoc ergo and all that, I know, but … Any ideas about what’s going on here?

Hi @randyenger

I think you are running into this issue:

Can you try switching the web IDE to compile against 0.4.7 instead of 0.4.7. latest?

I am also experiencing this problem with compilation using particle dev.

When is likely to be fixed and is there a way we can change the compiler used in particle dev ?

Thanks, @bko. That seems to work. (I say “seems” only because the problem had been a little intermittent before, and without exhaustive testing, dot dot dot.)

I appreciate the quick reply!

-Randy

1 Like

This underlying build farm issue should be resolved, so Latest should be OK again (at least for the Photon).

1 Like

Great! Thank you.

I’m having the same problem. I’m using a particle core and using particle DEV on the mac. Made sure I have updated Cli to latest (1.8.20) but still getting errors like ‘particle’ was not declared in this scope and also now missing the EEPROM.update function!

When will this be fixed?

Edit: When I change the EEPROM.update function to EEPROM.write I can compile and download but the core goes flashing red SOS (+1 solitary flash) immediately. Now I’m not sure is the problem with the 0.4.7 update or is it my code? I guess I’ll wait a while and see if it changes in the next few days. Bit of a bummer because I spent 4hrs trying to solve this.

Hello, Scruff Any ideas why I am getting a delcaration error when I compile ino file using webIDE build tool? What is the default syntax the compiler is a programmer to recognize C, Object-C, C++, Aurdino info. Perhaps the all same color ice-cream with different flavors you have to try it to know the difference. Here is a reference discussion https://arduino.stackexchange.com/questions/816/c-vs-the-arduino-language

Could you show us your code?

Hello Moors7
Thanks for asking Actually I did not write the code the code was written Nick Engmann

Systems Architecture Engineer at Circadence
I straight waydownloaded the github zip file and did a cut and past on WebIDE without any edits the file here is Inplants-argon.ino
I hope this helps

That code is only 51 lines long, whereas your setup function seems to be on line 69, which is where it’d land if you copy&pasted it twice. Could you double check to make sure that’s not the case :wink: ?

3 Likes

:sweat_smile::rofl::joy: I am so used to cut and paste and it works every single time EXPECT for when I have not had my morning coffee Thanks !!! for pointing it out… It does compile now !!

1 Like