Particle dev + particle-offline-compiler builds fine but uploads empty app

Hello,

I am Using Particle Dev with great success, however I wanted to setup local compile + dfu upload because I am having network issues in the last day which really slows compiling and OTA update down.

I did install https://github.com/chuank/particle-offline-compiler with all the dependencies and it seems to work, but:
It compiles just fine.
It uploads the firmware with dfu mode without issues.
Photon enters into the ready state (breathing cyan).
Nothing happens.
My code is not executing, it’s not doing anything, not logging to serial etc.

If i upload my code with cloud build + OTA it works.

Please if you have any idea what’s wrong, help me out :smile:

Example log with the offline compiler:

Ping @chuank to see if he can help. Off the top of my head, you can get the behavior you are seeing if you compile for the wrong platform (Core vs Photon etc), but I don’t use the Atom-based flow myself.

1 Like

hi @Peter.S the gist you posted seems to output a typical successful compilation + DFU upload – so like what you’ve said, it looks to be ok – it is compiling.

What the package does is simply concatenating a make command as per Particle’s build reference.

Perhaps a list of things to check:

  1. Does uploading a basic ‘blink’ code work?
  2. Chdir to your particle firmware (~/particle/firmware/main), run make clean and try compiling again
  3. Verify the current system firmware version you’re using on your Photon – go to Listening Mode, connect a Serial terminal and press ‘v’. You’ll need to ensure your local firmware branch compiles at that version
  4. If unsure, run git checkout latest at your local particle/firmware folder. IIRC and at the time of this post, it should be 0.4.9 (or whichever latest stable branch is on build.particle.io)
  5. Generally, if you are compiling from a branch that isn’t the same firmware version as what’s currently on your Photon, you need to flash the 2-part system firmware to your Photon first, then reflash your user firmware again.
1 Like

Thanks for replies.
I did verify yesterday that I am building against the correct platform and version.
I will try to build again tonight after chdir and make clean and see if that did help. Also I will try to upload a different sketch, like blink.