Web IDE builds different than CLI - Ubuntu 17.04 - need help diagnosing the problem

I’m extremely impressed with the Electron and am on the cusp of moving my next projects to it. The problem is I don’t think I can live with the web IDE, and the command-line build produces a different and unusable *.bin file from what the web IDE produces. I’ve been beating my head on this for almost two full workdays. I sure wish I could find a hint of what to look for!

My system is Ubuntu 17.04 and all of my tools are the latest po-util and particle-cli. The compile process seems flawless - alerting errors and warnings as it should. I’d be extremely happy if I could get an LED-blink example to work.

Symptoms: No errors anywhere. Project builds without warnings and downloads via “flash” without error. The downloaded firmware boots up with the RGB LED going through the regular cell connect patterns. When it reaches the end of the fast blue blink and you’d expect it to start breathing cyan, it kicks back into breathing magenta. It never transitions to the section of the code that blinks the LED on D7! Using the web IDE, the EXACT SAME SOURCECODE compiles to a *.bin which I download with dfu-util exactly the same as the CLI-built code and it works exactly as it should - blinking happily along.

I’ve built some impressive evaluation firmware with the web IDE but it is time to get serious about development on the Electron and use a decent editor and quick compile/flash process from the command line. It is in Particle’s best interest to assist with some pointers because I’m essentially in a race with another developer who wants to use a Digi XBee LTE-M. One of us will get our test to a functional state first which determines the direction of the project.

What version is the system firmare on the electron and what version are you building for? If the versions do not match the electron goes into safe mode (magenta).

Have you used po-util to upgrade the system firmware to 0.6.2?

po electron upgrade

Can you flash projects with po-util?

po electron init someProject
cd someProject
po electron clean # might be necessary
po electron flash
3 Likes

Aha! That is a good point and very likely the problem.

After much teeth gnashing:

Your device id is 250029000c51343334363138
Your system firmware version is 0.6.1

More in a few minutes. I’m using po-util to upgrade the Electron per another suggestion.

1 Like

Hot dog! Upgrading the firmware to 0.6.2 was the answer! I’m wiser now, and am even more impressed by the Electron since there’s decent quality support people behind it.

FWIW: For the last 34 years, I’ve made a career out of traditional embedded software engineering. When I discovered the Arduino development system 5 years ago I was hooked and dove headlong into a new direction of development. With what I’ve discovered from evaluating the Electron over the past few days with MQTT postings, Google integration, Webhooks, and the deep support with the functional libraries and git integration, I believe the Electron is worthy of investing a lot of time becoming fluent and proficient with its capabilities.

4 Likes

@davidhaile, while it's good you found a solution with po-util I still have to defend CLI as it does in fact produce usable binaries when used correctly.

  • make sure you target the correct platform
  • make sure you target the correct system version
particle compile electron <projectPath> --target <desiredVersionNumber>

(electron being the platform)


And @nrobinson2000, may I ask you to address the raised issues with the stock tools first before promoting your own third party tool.
We commend you for putting this together but it would still be nice of you if you would also "defend" Particle tools against misconceptions.

2 Likes

@davidhaile had mentioned po-util in his OP and he had double posted this to another community on an article I wrote awhile ago about po-util. https://dev.to/nrobinson2000/how-to-develop-particle-locally-using-po-util/comments/j41

I’ve also laid back on promoting po-util and I am getting a lot of new users organically.

4 Likes