Weird flash compile Issues, not seeing app-hash event?

I recently moved out of the ino file to separate cpp/h files.

After doing so, I’ve been having weird issues compiling and getting the Photon to flash to the latest version of code.

I don get any compiler errors, it says it’s flashing successfully, but it’s not taking the latest version.

The Photon resets as if it got the flash update, but it’s still the old binary. I noticed I don’t see the “spark/device/app-hash” event.

If I comment out certain lines of code, in particular, Particle.function calls (the functions themselves are located in the separate cpp file, then it flashes fine, an I see the “spark/device/app-hash” event.

However, if I comment those lines of code and simply comment out something else in the loop() code, then it also causes the issue! So I can’t correlate the issue specifically to the Particle.function calls.

This is very strange… What will cause the code to compile file but NOT get the spark/device/app-hash event?

To be clear, there are no compile errors in any situation.

How big is the resulting binary?

40kb

So I tried flashing to a different Photon that I had system firmware 0.6.2 on it and it worked fine. I think the problem is related with the 0.7.0-rc3 system firmware.