Photon not flashing correctly, or always flashing with tinker

I am having the same issue. My OSX setup is documented [here]
(Photon OSX local build setup notes on 20150531).

I reflashed system_pad_BM-09.bin from the releases page 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.

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!