WEB based compiler output works but CLI cloud compiler doesn't

OK guys,

Strange things are happening, let me explain: when I compile the example LED blinky code for my electron trough the web based interface and I upload it to my electron the example works and blinky is happy. However when I copy the EXACT code to the particle DEV (windows environment ) and hit compile (I also have selected that my target is my electron) followed by uploading it to my electron blinky doesnt work but the eletron goes to safe mode.

When I compare the binary output of both files the output is EXTREMELY different while the example input code is exactly the same:

For about 4 weeks ago it worked flawless (I was frustrated why my code that I wrote 4 weeks ago was no longer working, I boiled down to the windows environment responded with a not working binary ). SO what changed? Can somebody explain why even the same inputfile / example is no longer working while it did work a while ago? Did I miss something?

When you select the device in the Particle Build Web IDE, what does it say in the building with firmware popup?

My theory is that your Electron is running 0.4.8 and that the Web IDE is building the for the same. The Particle Dev Atom IDE doesn’t have that popup and only builds for the current release, which is 0.5.0 and was released a few weeks ago.

With the Photon, this isn’t a problem because the device will automatically update itself to 0.5.0, but the Electron does not, because it could use a lot of data. And when you build software for 0.5.0 and try to run it on 0.4.8, the Electron will go into safe mode.

The workarounds are to use Particle Build, upgrade to 0.5.0, or use a CLI build which allows you to specify the system firmware version you are building for.

2 Likes

Entering Safe Mode after reflashing indicates incompatibility between system firmware (lower version) and application firmware (higher version).

Dev currently always builds against the default (= most recent official) version while Build lets you select the target version.

BTW, your topic title mentiones CLI but the post talks about Dev :confused:


Darn. @rickkas7 has snatched that one :wink:

2 Likes

I think you are exactly right! (I am verifying right now).

I thought that by selecting the target in the particle DEV environment the compiler could have known what firmware version is running on the electron. It seems it doesn’t do this ( I would have liked that it behaved similarly to the web environment, I guess it is because its still in development? ).

Thanks for the extreme fast and knowledgeable response, I am positively surprised!

Somehow I am unable to find how to specify the firmware version in the CLI compile option. Can you maybe point me in the right direction?

YES!

It works now, I upgradet the firmware to 0.5.1 with the windows tool:

Thanks again! I can now continue looking for my own mistakes :stuck_out_tongue_winking_eye:.

1 Like

Maybe this time I'm quicker than Rick
Try particle compile electron . --target 0.5.1-rc.1

1 Like