Electron local build causes Safe Mode

Howdy folks,

Just getting started on the electron here, and I had no trouble flashing a simple blink app from the web ide.

However, building locally, the best I can get is the breathing magenta “safe mode” from the electron. The same locally built blink test app flashes to the photon and runs no problemo. I was able to also flash the same code from the web IDE. Any ideas what might be causing this? Which firmware version does the web ide use?


  • I have ‘latest’ checked out (last commit 1406c5d68…)

  • I’m running the following command from firmware/main:

      sudo make clean all PLATFORM=electron APPDIR=../../blink  TARGET_DIR=../../blink/target
  • this is the test file I am compiling (…/…/blink/blink.cpp)

      #include "application.h"
      void setup()
      pinMode(D7, OUTPUT);
      void loop()
      digitalWrite(D7, HIGH);
      digitalWrite(D7, LOW);
  • i have also tried this with release/v0.5-beta, no dice either

Aha! Put the electron in listening mode and checked the firmware version: 0.4.8-rc.6. Ran a particle update, and after successful update the firmware version is the same. After checking out prereleases/electron-v0.4.8-rc.6 I was able to get my code to compile.

Now the question is: is this the firmware version the electron should be on? Its certainly the firmware version cloud compile is using. I was under the impression we were on 0.4.9…

1 Like

0.4.9 on Photon and Core, 0.4.8 on Electron. It’s because the release schedules overlapped; should be a one-time thing.


Had the same problem with 0.4.9.

0.4.8 resolved it in my case as well:

git clone https://github.com/spark/firmware.git particle-firmware-electron
cd particle-firmware-electron
git checkout prereleases/electron-v0.4.8-rc.6

###create user/applications/eblink/application.cpp

cd main
sudo -E make clean all APP=eblink PLATFORM=electron program-dfu

Whenever you get the device in safe mode, use the CLI to tell you why:

particle serial inspect

That will help narrow down the causes. Often the cause is missing crc32 in the local build environment.

Thanks for clarifying everyone! @mdma I’ll definitely be using that trick for safe mode in the future, thanks