Firmware built outside particle tree flash fails

Howdy folks,

Like @mohammedmidhat I’ve been working on porting the QP frameworks ( over to the photon. I have an example program from the framework modified for the STM32f205 (photon uC) and have successfully compiled a binary with the CodeSourcery GNU toolset. However, when I try to ‘particle flash’ this binary, I get a non-descript “flash device failed” error.

I’m assuming this is because I did not build it within the particle firmware tree, because other binaries I’ve compiled using the instructions here flash just fine. Is there any way to get a more verbose output from particle flash though to confirm? Or does this explanation sound about right?

If so, why is building within this tree necessary/what does it really mean to do so? How might I adapt the makefiles and source I’m using to fit in this build tree?