Web ide not sending new code changes

I am loosing my confidence on the web ide sending the latest changes.
For instance, I compile my app and its verified. I then click flash and board is updated. I then make a small change and click flash again, led turns purple and reboots, but my changes are not updated. Its still running the last version of my code. I have had this same thing happen a few times yesterday as well.

Any idea why this is ?

This sounds similar to what I was seeing over in this thread on build IDE problems. After fixing a syntax problem, I had the same problem. Later I was able to cut and paste my code into a new project and it just downloaded and ran fine. I have not been able to reproduce the problem.

I would try putting an intentional syntax error in your code 1/2 way, then 1/4, etc. and see where the compiler stops reading your file. In my case, I found that it was not reading any of my code after the first line.

EDIT: I fixed the link.

I have experienced similar issues. Reloading the web IDE page has generally fixed the issue for me, but there are certainly some bugs to be ironed out.

Hi @amanfredi,

Great questions – The core has a fail-safe backup of your firmware when doing an over-the-air update. If something goes wrong during the flash, or it can’t run your firmware then it’ll fail safely back to the last version. If flashing isn’t working for me, refreshing the page and rebooting the core is a good way to make sure things are still connected and happy. We will definitely keep making lots of improvements every chance we get! :smile:

Edit: I’m thinking maybe based on this post we could have a better experience if we: 1.) made the app version on the core query-able and 2.) had the web-ide check on the version after the flash to verify things went through well.

Thanks,
David

How about a 32-bit CRC of the BIN with a timestamp? You could verify all of the code made it properly, more or less (CRC is not perfect)… and you’d know it was the latest code… in case you keep trying to re-flash the same thing over and over again.

The web IDE could then tell you that the Core in fact reverted to code from a certain time, or number of builds ago… or just that it reverted.

While we are talking about it… what is happening when the flashing Magenta light goes solid Magenta? I get that from time to time, and have to press reset on the Core… let it connect to the cloud, and try to re-flash again.

Ahh sure, doing a whole-file crc would let you know that things had changed and matched your last build, definitely. I wonder if people would want to know which project / build of was on the core at a given moment though. (I suppose you could do a best-effort crc match or something against a list of builds).

When doing an over-the-air firmware update, there are two phases, sending firmware in packets, and then moving firmware around on the core (you can tell when D7 goes on that’s its in phase 2). Each magenta flash represents a single packet of firmware coming over. If it gets hung up during this phase (solid magenta), it’s likely a packet got dropped (which it should recover from now after a few seconds), or the network has a very high latency (we’ve started talking about a version not as impacted by high-latency).

(Apologies if I’m slow today – getting over jet-lag :slight_smile: )

Thanks,
David

1 Like