Particle Dev : Binary file not updated on second compile!

Hi IOT-ers :smile:

As a novice with the Particle Dev, I ran into a interesting issue.
When I compile the code for the first time a binary file is generated.
However, If I modify the code and then compile, a new binary is not generated instead the old binary just sits there!

The work around : delete the .bin file prior to the next compile.

Do you guys have the similar issue?

Welcome to the community!

Can you share how you build the binary?

If you just want to flash a device over the air with the Particle CLI from source files you have on your machine in the current directory you can do particle flash my_device_name .

In Particle Dev (ATOM), I click on the ThunderBlot icon - “Compile in Cloud and upload code using cloud”.

Did you save the changes before compiling?

3 Likes

Two things you need to be aware here

  1. Dev does need to have a device selected before you can build, although a bug allows you to build once without having done so.
  2. Dev does not auto-save when you press build, so make sure there is no blue dot in the file tabs (unsaved file indicator) before building (as @Moors7 just said ;-))
2 Likes

@jvanier : I have to navigate to the target folder and then run the command with my device name?
The following is displayed “Please specify a binary file, source file, or source directory, or known app”

@Moors7 : Yes the changes are saved, CTRL + S before initiating the compile and flash command.

@ScruffR :

  1. The Photon is connected prior to compiling. Thanks on the hint about this peculiar bug!
  2. Initially, i was wondering about the blue dot, later i figured out that when the file is edited it indicates the same with the blue dot until the next save.

Any other thoughts?

Similar (same?) issue here.

Best I can tell “Compile in cloud and upload code using cloud” does NOT compile the code, it just uploads. Using “Compile in cloud and show errors if any” works though. Using both is required “Compile”, then “Flash”.

1 Like