# Photon not flashing correctly, or always flashing with tinker

**URL:** <https://community.particle.io/t/photon-not-flashing-correctly-or-always-flashing-with-tinker/12136>\
**Category:** Troubleshooting\
**Created:** [May 27, 2015, 6:41pm UTC](https://community.particle.io/t/photon-not-flashing-correctly-or-always-flashing-with-tinker/12136 "2015-05-27T18:41:35Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![DrPhoton](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@DrPhoton](https://community.particle.io/u/DrPhoton)\
**Post date:** [June 1, 2015, 5:39am UTC](https://community.particle.io/t/photon-not-flashing-correctly-or-always-flashing-with-tinker/12136/14 "2015-06-01T05:39:58Z")

</div>

I am having the same issue. My OSX setup is documented [here]  
([Photon OSX local build setup notes on 20150531](https://community.particle.io/t/photon-osx-local-build-setup-notes-on-20150531/12226)).

I reflashed system\_pad\_BM-09.bin from the [releases page](https://github.com/spark/firmware/releases) using the command above from mdma@, that did not solve the problem.

I’m able to successfully compile and flash the blink LED example via the Web IDE. I downloaded the blink binary from the Web IDE. I flashed that file using

```
$ particle flash --usb blink.bin

```

That succeeded: the led blinked.

What doesn’t work is putting the blink source code file into firmware/main/applications/blink/blink.cpp, then compiling/flashing using

```
$ make v=1 APP=blink PLATFORM=photon program-dfu

```

Note that the build/module.mk has Core-specific DFU commands, so I had to change those to:

# in bootloader mode before invoking ‘make program-dfu’

```
program-dfu: $(TARGET_BASE).dfu
        @echo Flashing using dfu:
        $(DFU) -d 2b04:d006 -a 0 -s 0x080A0000:leave -D $<

```

But it equivalently fails with

```
$ touch applications/blink/blink.cpp
$ make v=1 APP=blink PLATFORM=photon
$ particle flash --usb ../build/target/main/platform-0/applications/blink/blink.dfu

```

Complete output [here](http://pastebin.com/PdxpPxEp).

Again, the result is that the Photon restarts with Tinker the rather than the expected blinking LED.

BTW, how is the address used in the -s part of the dfu-utils command chosen?

Thanks!

---

_[View the full topic](https://community.particle.io/t/photon-not-flashing-correctly-or-always-flashing-with-tinker/12136)._
