Firmware not flashing thru CLI and Particle Dev

TL;DR Yesterday i was using Particle Dev and creating new builds and everything was fine, then on one flash, the Particle Dev stopped responding, and the program that was flashed seemed to be a previous build, not the latest one. It was in a loop where it flashed, showed the initial screen for a few secs and then flashed again, over and over. I realized I may have run out of memory 60K+ and tried to restart Particle Dev, It would not respond, restarts, even reboots and re-installs have not fixed it. I decided to move to the CLI environment and do some memory management in the code and got the .bin down to about 40K. When I flashed it, it seemed to work with this message:
Including:
photon_firmware_1457411790xxx.bin
attempting to flash firmware to your device xxxmydevicenamexxxt
Flash device OK: Update started

Then no further message of success or failure, just the command prompt. (I can’t remember if this is normal or not, but in any case, the Photon looks like it is dutifully flashing new binary but it is not a new one (I introduced new strings to the display to be sure).
So the CLI acts like it is fine but does not give me a proper flash.
Particle Dev is not responding (It responds to a point after reinstalling but it only gives the PartiDev menu and does nothing else including load files.
I tried to flash Tinker and succeeded but then I tried to flash from the CLI again and it acted like it was doing it but the “new” flash was tinker, not the bin I was sending.
I used the Web IDE just in case, and I reset the cache. I successfully flashed the blink LED example program and now my photon flashes the led, so that is working.

Also, I have logged out of the CLI and back in again a few times, I uninstalled Particle Dev and reinstalled it. node.js woks as does nvm.

It just seems like there is something that is between my windows PC and the cloud that in preventing a flash or just not responding.

Sorry for the long windedness here but I have been trying to fix it myself and feel I am out of tools.

I had a similar issue a while back, but upgrading node >= 4.x.x helped for me.
Also make sure to be on the latest CLI version.

It’s odd that it just broke for you a few hours/days ago.

BTW: What device are you targeting? Photon should happily take up to 120K

It is a Photon , but I thought some of the recent upgrades to firmware were eating into what was available for the user. When I was thinking this was my bad, I did some looking around to see what the limit was and i saw something about 60K. I may be off, because it was late and I was in a loop and very confused,
So I am apparently at 0.12.2 according to -v so I’ll give that a try.
I am with you in that it was very strange that it just suddenly happened and I first assumed that the binary was corrupted in transit. Also, why did it go back to a previous version? I was just making some changes to strings in the display so this wasn’t a big change but since the strings didn’t change I figured the bins weren’t flashing, but then the photon dutifully makes theled blink to show an update is flashing but it’s not what happens.

BAM! the CLI is fixed now. Very interesting that the .bin increased in size greatly vs the last one considering they were based on the same source. But the latest ne is right in line with the size I expected to get after i did some shrinking of fonts to save space. I got a good flash with and up to date file.

Now to see if I can fix Particle Dev. Gotta run now though

1 Like

Well I’ve had time to try some fixes for Particle Dev but to no avail.
The fix you suggested for CLI worked great but Particle Dev still comes up with only the non-functional Particle Dev menu and then stops responding.
I have uninstalled it and reinstalled. Are there any “clean install” instructions? I’m guessing that something was corrupted and just isn’t getting fixed.

It’s interesting that the broken CLI was causing *.bin files that were old or not fully linked since the file size was too small.