Application (user) code not running after building firmware locally

I was able to build the latest firmware locally, and transfer the 3 binaries to my photon. However, after leaving dfu state, restarting, flashing green momentarily, the device goes into breathing red and blue LED state. I don’t see “breathing red and blue” as a listed state on the Particle Guide, but I’m guessing it is some form of “safe mode”?. Serial command “particle list” shows the device is online, but doesn’t list any particle.functions, suggesting the tinker application is not working.

Any ideas what may be happening or how I can debug (aside from ordering the debugging shield, installing openocd, gdb, etc)?

dfu-util version: 0.8

Also, how does flashing via dfu-util compare to flashing via ‘particle flash device *.bin’?

Thanks!

I think that’s blinking magenta and that’s safe mode. That shouldn’t happen when you flash all three parts, but I’d do this:

Delete the firmware/build/target directory
In firmware/modules do a make clean PLATFORM=photon
Put the Photon in DFU mode (blinking yellow)
In firmware/modules do a 'make all PLATFORM=photon program-dfu`

Add any other make options you need. The last one, adding program-dfu, does the DFU directly from the make instead of having to manually do it after you build, and eliminates any possible issues with that.

1 Like

I recently worked on compiling and flashing locally and was met with a lot of problems as well. You definitely are in safe mode. have you installed all the correct versions of the dependencies? I’m specifically referring to the GCC compiler (you should not install the latest version which is 5.4, but 5.3 works fine). Also, did you install MinGW (if you’re on windows)?

1 Like

@rickkas7 @gio926

Thanks for your help. While I had MinGW correctly installed, I also had Gygwin installation, which I had to remove from PATH. Now it works! Apparently the functionality of bash commands (pwd/ls/etc) must be slightly different in my Cygwin and MinGW installations, which was tripping up ‘make’ scripts.