Randomly getting "Compile failed" on CLI, and Web IDE doesn't work either

I intermittently am able to use the Web IDE to flash my code, but only AFTER I flash the Tinker sketch onto my Particle.

This started last night, and I’m unable to get my code working even after reverting back to the original, working code.

I get NO errors when I compile via the CLI and no errors via the Web IDE. Just “Compile failed”. :confused:

Compiling code for core

Including:
/Users/rob/workspace/led_clock/pitches.h
/Users/rob/workspace/led_clock/led_clock.ino
/Users/rob/workspace/led_clock/SparkTime/SparkTime.h
/Users/rob/workspace/led_clock/SparkTime/SparkTime.cpp
/Users/rob/workspace/led_clock/WS2801/WS2801.h
/Users/rob/workspace/led_clock/WS2801/WS2801.cpp
attempting to compile firmware
Compile failed. Exiting.

Ideas?

We got that sometimes when some build servers are running out of space.

Are you stillseeing this “Compile failed”?

But the inability to flash OTA is most the time due to blocking code in your application.
Can you next time try Safe Mode instead of reflashing Tinker?

I was able to FINALLY compile the code –

After repeated, non descriptive errors I removed a bit of code that generated tones over an analog port. It was a LONG process of elimination, unfortunately.

Apparently Particle doesn’t like when I generate tones in the setup() function, despite having a long Mario Bros tones being played before.

In any case, I’m able to compile consistently now, and everything is working.

What’s safe mode? I haven’t seen any documentation about that.

  • Rob

The search feature of the docs helps :wink:
https://docs.particle.io/guide/getting-started/modes/photon/#safe-mode

You can have tone() in setup(), you just need to be aware that long actions might affect OTA and other cloud functions, so you should choose the correct SYSTEM_MODE() and maybe use SYSTEM_THREAD(ENABLED).


Update:
But I missed that you are (still) using a Core, which hasn’t got Safe Mode nor SYSTEM_THREAD(ENABLED) :blush:

Still? What did I miss :joy:?!

You are missing out on the superior performance and the cheaper price of the Photon!

And Cores are out of production/stock for quite a while already (apart from retailers that didn’t sell them earlier - poor sods :wink: )

Weird – I bought this less than a year ago from the Particle Store. I got the Photon kit – maybe old stock?

If you bought a Photon kit, you must have a Photon and not a Core.
The Photon is easy to recognize, it has no components on the bottom side.

In order to build for Photon with CLI you need to do

particle compile photon .

And in Particle Build (Web IDE) you need to select (star) the Photon you want to target.

I think I mixed up my Particles and put the Core in this project instead of the new one. Oops.

2 Likes