Photon flashed code once, cannot replace it with any new code

Ok, I have reflashed both parts of the latest 0.4.2 firmware release to the Photon as per your suggestion in another thread. I still cannot flash locally compiled code by USB or cloud to the Photon, though.

The .bin's being generated by executing make inside ../firmware/main are indeed between 70Kb - 80Kb, even for an exceedingly trivial program that just sets the RGB to be one colour.

So I'm given to understand here that local compilation is targeting a Core and not a Photon, which is why it's being rejected (?)

How should I proceed to compile locally for a Photon then?

OH!!! I'll just answer my own question here:

By default, the Core is the target platform. To build for the Photon, run

make PLATFORM=photon

All told, the solution for me was to run the "Update the System Firmware" steps found here. As soon as I did that, the Photon rebooted and the code that previously was flashed but not running, immediately started running.

Thanks for pointing me in the right direction!

1 Like