Photon Firmware Upload and photon does not restart

At my first attempt to Upload Photon Firmware (0.4.2, main.bin, 0x8020000 or 0x80a0000),
upload seems to be ok but photon stays at dfu mode.
Some help…

some more details please… :wink:

Where did you get main.bin from? What commands are you using to upload it?

As a starting point please flash the photon binaries from the 0.4.3 release.

After flashing 0.4.3 fimware and then flashing my version blahk, which just turns led to green and red, I found out that photon do not run my blank app.
If app was runnig photon would not ignore SESTEM MODE MANUAL.

A few questions:

  • How are you building the application?
  • what size is the application binary produced?


2284 bytes for blank using netbeans and cywin

The same runs from my other pc

I am using Netbenas and cywin for local bulding.
Building goes ok, and so good goes flashing firmware.
The same should be doen for application flsh but photon does not seems to execute it.
No command in applicatiosn does something at runtime,
photon just goes to cloud connect even if SYSTEM MODE is set to MANUAL through application.
If SYSTEM MODE is set to MANUAL in firmware photon is flashing white and that is all.

  • which branch are you building against?
  • did you update the system firmware?

Hi @yianmar

You have already created these threads about this problem:

It’s best to not cross post so we can keep the discussion in one place.

@moors7: posts have been moved accordingly.

1 Like

I compiled the letest firmware and flushed!!
Is it enough?

Please be more specific and tell us what and how did you do it.

And also answer my questions if you want use to help you:

  • which branch are you building against?
  • did you update the system firmware?

I have read this, but sounds useless because I have the latest firmware compiled and flushed.
After all whatever the firmware is, I just wrote a test app using firmware sources.

Could you tell me where is the exact point in firmware where I could set SYSTEM MODE to MANUAl.
I suppose I did it wrong

Setting SYSETM_MODE should be outside of any function - usually near the top of your program code before setup()/loop(). Like this:


void setup()
// ...

void loop()
// ...

That is the way I am doing it, but app is not runnig.
So I am trying to set SYSTEM MODE deeper…rigth now I am trying main.c

I don’t think you need to do that.

Let’s just be sure we are on the same page, since the mention of main.bin at the start of the thread doesn’t sound right:

  • the photon has 0.4.3 firmware installed. Please double check you flashed part 1 to 0x8020000, and part 2 to 0x8060000.
  • since you are building locally, please switch to the latest branch and pull the latest changes there
  • using make, you then build your application from the main folder by running

make PLATFORM=photon APP=<appname> all program-dfu

This will then flash the application to your photon. Note that the binary flashed is not called main.bin but named after your application. If you use the default application (leave out APP=<appname>) then the binary will be called user-part.bin. The make system takes care of flashing the binary to the correct address, which you should see is 0x80A0000.

Please try this and let me know!

Is downloaded, ok? or should I do something else?

That’s ok, although later on you might want to install git so you can keep up to date more easily than downloading zip files. (The main page in the firmware repository has details.)

As many times i HAVE TRY, following what is written at,
I am getting another firmware which is the same to the core one.
anyway while “making” firmware ( from command lline (/firmware/main…make clear all PLATFORM=photon APP=tinker program-dfu),
and the result is that
1.Some error? occurs…dfu reports
a. Serial device PARTICLR_SERIAL_DEVICE : not avialiable… (no problem ?)
b. dfu closes routine with make error 2 (no problem )
but file downloadd succesfully (tinker.cpp … 4740 bytes downloaded)
2. photon stays at dfu mode (yellow led) and NO app working

before all these I have firmware system-part1-0.4.3-photon.bin and system-part2-0.4.3-photon.bin downloaded
(is it correct I I had to build latest firmware from /modules first?)

dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.4.3-photon.bin
dfu-util -d 2b04:d006 -a 0 -s 0x8060000:leave -D system-part2-0.4.3-photon.bin

Do I expect well, photon to stay blinking white if SYSTEM MODE is set to MANUAL?