Issues with local compile

Hey everyone,

I’ve been trying to set up local compiling on the particle photon and I seem to run into issue after issue. Right now my biggest problem (or so it seems) is that every time I try to flash the device locally, the device goes into safe mode.

A little background:
I followed the instructions on flashing the photon locally on the gitindent preformatted text by 4 spaceshub firmware page. I have downloaded the GNU tools (v4.9) GnuWin32 as well as MinGW and set the path the respective path variables.

When I run the dfu-util -l in the command prompt I get the correct DFU device found (2b04:d006)

Following the instructions on the Github page, i try running “make clean all PLATFORM=photon -s program-dfu” on the modules folder of the firmware, however I get the following error:

C:\Particle2\firmware\modules>make clean all PLATFORM=photon -s program-dfu
/usr/bin/bash: arm-none-eabi-gcc: command not found
../build/ *** "ARM gcc version 4.8.4 or later required, but foun
d ".  Stop.

As suggested in some threads as well as in the instructions, I try running the same command but in the main folder. I get a successful file download HOWEVER the photon enters safe mode:

C:\Particle2\firmware\main>make clean all PLATFORM=photon -s program-dfu
Can't locate Archive/ in @INC (you may need to install the Archive::Zip mo
dule) (@INC contains: blib/lib lib /usr/lib/perl5/site_perl /usr/share/perl5/sit
e_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/co
re_perl /usr/share/perl5/core_perl .) at /c/Particle2/toolchain/MinGW/msys/1.0/b
in/crc32 line 7.
BEGIN failed--compilation aborted at /c/Particle2/toolchain/MinGW/msys/1.0/bin/c
rc32 line 7.
   text    data     bss     dec     hex filename
   6372     156     596    7124    1bd4 ../../../build/target/user-part/platform
dfu-suffix (dfu-util) 0.7

(C) 2011-2012 Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to

No valid DFU suffix signature
New DFU suffix added.
Serial device PARTICLE_SERIAL_DEV : not available
Flashing using dfu:
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to

Filter on vendor = 0x2b04 product = 0xd006
Opening DFU capable USB device... ID 2b04:d006
Run-time device DFU version 011a
Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash   /
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
Dfu suffix version 100
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x080a0000, size = 6544
File downloaded successfully

I tried manually downloading the system part 1 and 2 .bin files and flashing them myself to the appropriate addresses but that yields the same results. (I flashed the system part1 to 0x8020000 and part2 to 0x8060000)

I read in some threads that this might be an issue with the crc32 (of minGW) not working well. I connected the device to serial and used the s command and noticed that in some of the instances the vv and vc numbers don’t match. I guess I am dealing with some different version of crc32 but I am not sure how to fix this.

Did anyone have this issues or knows about this that can direct me? I am running on windows 7.

Any help is greatly appreciated!

It’s a bit dated but I’ve had good results with this installer
Toolchain for Windows Installer

This downloads required dependencies and adds the correct PATH entries.

Messages like this indicate some dependencies/PATH issues

/usr/bin/bash: arm-none-eabi-gcc: command not found