Flash new firmware on Photon

Hi,

I cloned the firmware project from Github.
Then, I ran:

$ make PLATFORM=photon all

This worked fine judging from the logs.

Now, I am a bit lost how to flash the output via USB, e.g. with

$ particle flash --bin firmware.bin

Also, looking at the output of the build gave multiple .bin files:

pm:firmware pmu$ find . -name "*bin" 
./bootloader/tools/locker-firmware.bin
./bootloader/tools/unlocker-firmware.bin
./build/bin
./build/target/bootloader/platform-6-lto/bootloader.bin
./build/target/user-part/platform-6-m/user-part.bin
./hal/src/photon/dct_prep.bin

Any hints how to proceed?

You can use make all PLATFORM=photon program-dfu and it will flash the binary to the device via DFU after compilation.

For your question, the binary file location is shown at the end of the compilation and if you grab the .bin file you can use the particle --usb xxx. bin

The former is definitely easier to use :slight_smile:

1 Like

Thanks.

The reason I was asking was that the program-dfu target could not be found in the Makefile. It looked like it disappeared, or something else is missing in the latest branch.