[Photon] Unable to flash new code

I would really recommend waiting out for mdma to comment or if you really want to try, flash this instead: https://github.com/spark/firmware/releases/tag/0.4.2

ok, thx. Sorry I need to get that fixed quickly. So I just flashed the 0.4.2 now. How can I now build locally with that new firmaware, or change the web ide?

Nope. You can use the Web IDE as per normal.

Try a factory reset and see if it enters listening mode like it should.

ok, weird. I hold setup and reset, then release reset. it went through magenta, yellow, green and finally white - I released setup - now the D7 led and the white RGB led flash in turns each 1/2 second. :slight_smile:

That’s super weird. After waiting…what happens?

it still blinks like that. I have the strange feeling that it might be executing the blink code that I tried to put on it before. That would explain the D7 blinking. So maybe it’s then “just” white blinking, but slowly…

Can you then place it in Safe mode and try flashing other app?

nope. It returns to the “slow white blink mode” :frowning:

Revert the system to the V0.4.1 firmware instead then.

I would really recommend waiting for a reply from the firmware guru. :wink:

yup, let me revert to 0.4.1 and then wait for @mdma. Thx for the help!

Hi @kennethlimcp

Using the 0.4.2 base firmware and webIDE was a no-go for me. It would work once but then I could never get the next program flashed and I eventually landed in flashing green after every attempt.

Maybe it depends on what features of the HAL you are linking against since if things move in the dynamic link tables, you could get very weird behavior.

I don’t think the webIDE is using 0.4.2 right now, but we need @mdma to sort this out.

What I find strange is that the web ide is not even using 0.4.1 for me - it’s 0.3.4 as you’ve seen in the screenshot. Anyway, I am now hanging in the endless white blink loop :slight_smile:

@hansamann, if you select a Photon as the target on the IDE, it will compile to v0.4.0.x. However, this is not shown on the IDE yet. The v0.3.4 is for Cores. Make sure you have the Photon selected as your target.

1 Like

Hi @hansamann

Are you sure your web IDE is set up to target a Photon? To the best of my knowledge the 0.3.4 release does not support Photon.

[And @peekay123 beat me again!]

1 Like

Yes, I just hit that star again and switched to another photon, then back to the one I have here and that now just blinsk white. I then went to the settings and again found 0.3.4 there.

For that’s’ command and the commadn line / serial: was the output expected?

I now cannot repeat it any more, I can’t get into that mode. I can still get in the dfu mode though.

I just flashed the 0.4.2 again - wondering if that sudden end is expected - after the second file I get this:

Downloading to address = 0x08060000, size = 146072
Download [=========================] 100% 146072 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status

Do you experience the same?

Hi @hansamann

This is a “known bug” in the DFU where after it downloads successfully it tries to get status and fails. If you see the download 100% and File downloaded successfully lines, you are OK.

1 Like

If this is reproducable I’d like to have details please. The aim is that it’s always possible to update the system firmware and still build an application against an older version. (E.g. The webide is at 0.4.1, it should still be fine to update system firmware to 0.4.2.)

1 Like

Hi @mdma, I’ve flashed the photon with the 0.4.2 version many times now. It constantly blinks white now and I don’t know how to ever connect it again. Let me know what you specifically need.

Can you please save the DCT area using this command:

dfu-util -d 2b04:d006 -a 0 -s 0x8000000:0xC000 -U dct.bin

and send me the resulting file. Thanks!