Sketch not "taken" after flashing?


I have a device that seems to flash ok via the particle build web IDE.

It’s online, I can rainbow signal it. The flash process completes with the device flashing magenta during the update.

After the update, the device returns to breathing cyan.

However, the simple test code does not run on the device

void setup() {
void loop() {

Any ideas?

Is it part of a product (then its firmware might be overwritten as soon as it comes online again)?

Also what did the previously running code look like?

You could put the device in Safe Mode before flashing the new firmware to prevent the currently active code from messing with the update process.

it’s not part of a product.
I can’t get the device into Safe Mode with the buttons, it just just returns back to breathing cyan?

this is a vid, it seems to flash correctly… but not taken…

Have you tried clicking on the test code button before clicking on flashing? I am having a similar issue with ParticleDev and clicking on compiling and then on flashing seemed to solve the issue. I have to do some more tests this weekend.

I think it is a problem on the server side, if the code is very close to the previous one (in time) it will not recompile by clicking on flashing, just flash the version it already has. It could be a problem of the local machine with a buffered version too (in case of ParticleDev).

That would indicate an even bigger problem.
In this situation, I’d perform an update via USB (in DFU Mode - with the most recent CLI, currently 1.23.1)

particle update
particle flash --usb tinker

hi there,
the USB flash worked over usb, tinker is running.
However anything I try to flash over the cloud appears to work (accodring to the web UI), but the code is not actually in the device. changing the firmware version also appears to complete but did not actually change the device.

Maybe you can PM @rickkas7 your device ID and he might be able to check the logs for possible reasons.

The most common reason for this is incompatible versions. If you compile against a higher version of the system firmware and then try to load that onto a device with a lower version, it won’t “take.”

You can use the CLI to find out what version you have on your device in USB and depending on how you compile, you should make sure you are set up for that version in the compile step.

1 Like

The cloud logs look normal. The most recent flash at Jul 13 11:19:48 (-0400, EDT) appears normal. Your code is not getting overwritten from the cloud side. It’s not part of a product.

Another thing to test would be to open up a browser tab at and open the Logs tab. Flash the code and watch for the app-hash message. Then modify the code such as by changing a string constant in a serial debug log message or something that would affect the compiled code, then flash it and make sure the app-hash changes.

1 Like

hi, can’t seem to locate the logs tab in the console?

@andyg, it’s actually the “events” tab on the LHS showing as >_

1 Like

It’s the third icon bellow the :particle: logo on the left nav bar
or just

1 Like
event: spark/flash/status
data: {"data":"started ","ttl":60,"published_at":"2017-07-13T16:39:00.907Z","coreid":"3c003a001347353136383631"}

event: spark/flash/status
data: {"data":"success ","ttl":60,"published_at":"2017-07-13T16:39:01.544Z","coreid":"3c003a001347353136383631"}

event: spark/status
data: {"data":"online","ttl":60,"published_at":"2017-07-13T16:39:04.308Z","coreid":"3c003a001347353136383631"}

event: spark/device/last_reset
data: {"data":"user","ttl":60,"published_at":"2017-07-13T16:39:04.566Z","coreid":"3c003a001347353136383631"}

event: spark/status
data: {"data":"online","ttl":60,"published_at":"2017-07-13T16:40:15.869Z","coreid":"3c003a001347353136383631"}

@andyg, seems the code flashed as expected.

But the hash event is missing

1 Like

there arn’t any app-hash messages?

and my code is not in the device as per the video…

@andyg, what code is sitting on the device now? Tinker?

yes tinker flashed via usb is running, it does not get removed by the cloud flash process.