Toolchain for Windows Installer

Is this it? How do you change the system path?

PATH=C:\ProgramData\Oracle\Java\javapath;C:\Program Files\ImageMagick-6.8.9-Q16;
owsPowerShell\v1.0;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\QuickT
ime\QTSystem;C:\Program Files (x86)\nodejs;C:\Program Files (x86)\Windows Kits
\8.1\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tool
s\Binn;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\M
icrosoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\NVIDIA Corporation\Ph
C:\SparkCorePrograms\dfu;C:\SparkCorePrograms\Git\bin;C:\SparkCorePrograms\GNU T
ools ARM Embedded\4.8 2014q2\bin;C:\SparkCorePrograms\GnuWin32\bin;C:\Users\Main


@mumblepins, I’m using Windows 7 Ultimate

IF it’s a path problem like mine, what I did in my case is:
select Control Panel then System then Advanced then Environment then System Variables.
Scroll down in the BOTTOM window to the Path item, highlight it and click Edit…
Now, being super/ultra careful, add
at the very beginning. YOU MUST NOT DELETE ANYTHING THAT"S ALREADY THERE. If you do destroy what’s already there, simply cancel the edit and retry. Once you get it right, click OK each window backing out.
BTW I always copy my paths and save them in a file safely first before editing.

Again, the simple temporary way to change the path and test if it’s the problem is the way I mentioned before, typing
set PATH=C:\Particle\Toolchain\MinGW;C:\Particle\Toolchain\MinGW\msys\1.0\bin;%PATH%
in the terminal window and not rebooting. I note you have MinGW in a different spot than I do so that may be why it didn’t work if you tried it before.

But I definitely defer to @mumblepins as he developed the install procedure.

To change the system path, the easiest way is search in the start menu for environ… and up will pop up “Edit the System Environment Variables” which will actually show you both the system and user variables. Temporarily you can also set it via the command set PATH=C:\Windows..... Whatever you want, seperated by semicolons or to append set PATH=%PATH%;C:\pathtoappend

Try a quick thing though first, open up a command prompt, run set PATH=C:\Particle\Toolchain\MinGW;C:\Particle\Toolchain\MinGW\msys\1.0\bin;C:\Particle\Toolchain\Make\bin;C:\Particle\Toolchain\GCC-ARM\bin and then run make.

1 Like

appears to have worked correctly. below is the output when runing: make PLATFORM=P1 clean all

Where does the files output to?

32+0 records in
32+0 records out
32 bytes (32 B) copied, 0 seconds, Infinity B/s
4+0 records in
4+0 records out
4 bytes (4 B) copied, 5.955 seconds, 0.0 kB/s
[ ! -f …/…/…/build/target/user-part/platform-8-m/user-part.bin ] || rm …/…/
mv …/…/…/build/target/user-part/platform-8-m/user-part.bin.pre_crc …/…/…/b

arm-none-eabi-objcopy -O ihex …/…/…/build/target/user-part/platform-8-m/user-
part.elf …/…/…/build/target/user-part/platform-8-m/user-part.hex
arm-none-eabi-size --format=berkeley …/…/…/build/target/user-part/platform-8-
text data bss dec hex filename
4596 144 332 5072 13d0 …/…/…/build/target/user-part/platform
arm-none-eabi-objdump -h -S …/…/…/build/target/user-part/platform-8-m/user-pa
rt.elf > …/…/…/build/target/user-part/platform-8-m/user-part.lst
make[1]: Leaving directory `/c/Users/Main/firmware/modules/photon/user-part’


Great! build/target/user-part/platform-8-m/user-part.bin is the main one you want.

1 Like

Is it possible to do this on Ubuntu?

I am normally a windows user but for some reason decided to setup a laptop for particle development using Ubuntu. I got the CLI working last night.

It’s probably easier. I can take a look at it in the next day or so.

I just tried updating the firmware to the development branch but I got the below: Did the new firmware update on the P1?

I went to the main and ran: make PLATFORM=P1 clean all program-dfu

© 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 -d 0x2B04:0xD008 -a 0 -s 0x80A0000:leave -D …/…/…/build/target/user-
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 = 0xd008
Opening DFU capable USB device… ID 2b04:d008
Run-time device DFU version 011a
Found DFU: [2b04:d008] 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 = 4564

File downloaded successfully
Error during download get_status
Error during download get_status
make[1]: Leaving directory /c/Users/Main/firmware/modules/photon/user-part' make: Nothing to be done forprogram-dfu’.


To me that actually looks right. Did the code seem to get updated on the module? Per the firmware github page:

As of 12/4/13, you will likely see Error during download get_status as the last line from the dfu-util command. You can ignore this message for now. We're not sure what this error is all about.

ive been trying to update the system firmware for the P1 using the below and I get the below errors. I’ve already tried updating the PATH as you stated above. Any ideas?

put the Photon in DFU mode
cd modules
make PLATFORM=P1 clean all program-dfu

@mumblepins, just tried making the newest branch called latest and i got the below error:. Whats the best way to updated the ARM gcc version to 4.9.3?

Please pull the latest code. The build system now accepts any compiler version that is at least the minimum required.

EDIT: But please also read the message. :slight_smile: It’s saying it needs version 4.9.3 but you have only 4.8.4 installed.

The pervious error above: dfu-suffix command not found. So you should install dfu suffix also, in addition to dfu-util.

1 Like

Updated release, now pulls down 2015q2, and changes the path adding method.

@wesner0019, it sounds like you have a lot of older versions and such cluttering up your build environment. I might suggest a thorough cleaning up of installations and the path, and maybe some reinstalls. Alternatively, a virtual machine can always be your friend :smile:.


@Bspranger, I think the reason you used Ubuntu is that development is way easier to set up. Here’s a one liner to install the necessary stuff (tested on 14.04, raw install).

sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded && sudo apt-get update && sudo apt-get -y install gcc-arm-none-eabi git

You can then clone and build for the Photon with:

git clone && cd firmware && git checkout latest && cd main && make clean all PLATFORM=photon && cd ../build/target/user-part/platform-6-m

Here is a gist with an install script.

1 Like

@mumblepins thanks! I will try this once I get released from the hospital… ;-(

@Bspranger take care :smile:

1 Like

Nice installer! But it seams that I have some problem :frowning:
Everything seems to get installed and no error occurs, but the folders Make and MinGW are totally empty after the installation is completed…

Any ideas?

Why yes I do have ideas :smile: It’s because Sourceforge sucks, and the installer can’t download them :frowning: This tweet is from 10 hours ago with no update since then, so remember this the next time the Particle cloud has an outage, at least we get updates on it with slightly higher frequency.

#SourceForge site is read-only, developer services disabled due to storage infra fault. Service restoral work in-progress, ETA to follow

— Operations (@sfnet_ops) July 17, 2015

So, we just have to wait…

1 Like

@mumblepins, thanks for the info!

Have to be patient and wait… :grin: